java-sdk
java-sdk copied to clipboard
Blocking call detected by BlockHound in DaprGrpcClient
Expected Behavior
Implementation of DaprGrpcClient does not make blocking calls.
Actual Behavior
The DaprGrpcClient class has blocking calls in it. For example:
@Override
public Mono<byte[]> getState(String actorType, String actorId, String keyName) {
return Mono.fromCallable(() -> {
DaprProtos.GetActorStateRequest req =
DaprProtos.GetActorStateRequest.newBuilder()
.setActorType(actorType)
.setActorId(actorId)
.setKey(keyName)
.build();
ListenableFuture<DaprProtos.GetActorStateResponse> futureResponse = client.getActorState(req);
return futureResponse.get();
}).map(r -> r.getData().toByteArray());
}
Note: there are two DaprGrpcClient classes in the project, blocking calls were fixed in one of them, The one I am talking about is in the io.dapr.actors.runtime package.
Steps to Reproduce the Problem
Release Note
RELEASE NOTE: FIXED implementation of DaprGrpcClient making blocking calls.