Skip to content
Snippets Groups Projects
Commit 45b07260 authored by MZhu9's avatar MZhu9
Browse files

1. add new audit event for reindex records API

2. switch from storage query/records:batch API to query/records API
parent 24f8a2d8
No related branches found
No related tags found
1 merge request!556Implement reindex records API
Pipeline #191741 failed
......@@ -146,7 +146,10 @@ public class StorageServiceImpl implements StorageService {
throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Internal Error", response.getBody());
}
try {
return this.objectMapper.readValue(response.getBody(), Records.class);
Records records = this.objectMapper.readValue(response.getBody(), Records.class);
ids.removeAll(records.getRecords().stream().map(Records.Entity::getId).collect(Collectors.toList()));
records.setNotFound(ids);
return records;
} catch (JsonProcessingException e) {
throw new AppException(RequestStatus.INVALID_RECORD, "Invalid request", "Successful Storage service response with wrong json", e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment