Fix status code
This commit is contained in:
parent
9063159a64
commit
4e2e1e8c8e
@ -587,7 +587,7 @@ public class GrpcConnection extends BaseConnection implements RocksDBAPI {
|
|||||||
var desc = statusRuntimeException.getStatus().getDescription();
|
var desc = statusRuntimeException.getStatus().getDescription();
|
||||||
var closeIndex = desc.indexOf(']');
|
var closeIndex = desc.indexOf(']');
|
||||||
var errorCode = desc.substring(grpcRocksDbErrorPrefixString.length(), closeIndex);
|
var errorCode = desc.substring(grpcRocksDbErrorPrefixString.length(), closeIndex);
|
||||||
var errorDescription = desc.substring(closeIndex + 1);
|
var errorDescription = desc.substring(closeIndex + 2);
|
||||||
return RocksDBException.of(RocksDBErrorType.valueOf(errorCode), errorDescription);
|
return RocksDBException.of(RocksDBErrorType.valueOf(errorCode), errorDescription);
|
||||||
} else {
|
} else {
|
||||||
return t;
|
return t;
|
||||||
|
@ -301,7 +301,6 @@ public class GrpcServer extends Server {
|
|||||||
@Override
|
@Override
|
||||||
public Mono<Changed> putGetChanged(PutRequest request) {
|
public Mono<Changed> putGetChanged(PutRequest request) {
|
||||||
return executeSync(() -> {
|
return executeSync(() -> {
|
||||||
if(true) throw new RocksDBRetryException();
|
|
||||||
try (var arena = Arena.ofConfined()) {
|
try (var arena = Arena.ofConfined()) {
|
||||||
var changed = api.put(arena,
|
var changed = api.put(arena,
|
||||||
request.getTransactionOrUpdateId(),
|
request.getTransactionOrUpdateId(),
|
||||||
|
Loading…
Reference in New Issue
Block a user