Skip to content

Blocking call detected by BlockHound in DaprGrpcClient #787

Description

@yshulzh

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions