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