Closed
Description
The following code always returns single object, even if WAL TAIL API (https://docs.arangodb.com/3.12/develop/http-api/replication/write-ahead-log/#tail-recent-server-operations) returns multiple json objects:
protected CompletableFuture<Response<OperationResponse[]>> fetchEventsFromCurrentTick(ArangoClientProvider sourceProvider, ProcessingState processingState) {
Request<OperationResponse[]> tailRequest =
Request.<OperationResponse[]>builder().path(WAL_TAIL_PATH.formatted(sourceProvider.arangoDBName()))
.method(Request.Method.GET)
.queryParam("syncerId", processorSettings.walSyncerId)
.queryParam("chunkSize", String.valueOf(processorSettings.chunkSize))
.queryParam("lastScanned", String.valueOf(processingState.getLastScannedTick()))
.queryParam("from", String.valueOf(processingState.getCurrentTick()))
.build();
return sourceProvider.getClient().execute(tailRequest, OperationResponse[].class);
}
As far as I investigated it, it's caused by Jackson behaviour which only allows for properly defined json objects. Unfortunately, json objects are not wrapped in array in Arango API.
I tried using RawJson type - it doesn't matter.
Metadata
Metadata
Assignees
Labels
No labels