Compare commits
2 Commits
b4c610be08
...
b7172db2f9
Author | SHA1 | Date | |
---|---|---|---|
|
b7172db2f9 | ||
|
60474f2a75 |
@ -65,6 +65,7 @@ public class GrpcConnection extends BaseConnection implements RocksDBAPI {
|
||||
super(name);
|
||||
var channelBuilder = ManagedChannelBuilder
|
||||
.forAddress(address.host(), address.port())
|
||||
.directExecutor()
|
||||
.usePlaintext();
|
||||
this.channel = channelBuilder.build();
|
||||
this.blockingStub = RocksDBServiceGrpc.newBlockingStub(channel);
|
||||
|
@ -772,6 +772,8 @@ public class GrpcServer extends Server {
|
||||
if (ex instanceof CompletionException exx) {
|
||||
handleError(responseObserver, exx.getCause());
|
||||
} else {
|
||||
var serverResponseObserver = ((ServerCallStreamObserver<?>) responseObserver);
|
||||
if (!serverResponseObserver.isCancelled()) {
|
||||
if (ex instanceof RocksDBException e) {
|
||||
responseObserver.onError(Status.INTERNAL
|
||||
.withDescription(e.getLocalizedMessage())
|
||||
@ -782,6 +784,9 @@ public class GrpcServer extends Server {
|
||||
.withCause(ex)
|
||||
.asException());
|
||||
}
|
||||
} else {
|
||||
LOG.error("Unexpected error", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user