Fix status code

This commit is contained in:
Andrea Cavalli 2024-10-24 03:12:02 +02:00
parent 9063159a64
commit 4e2e1e8c8e
2 changed files with 1 additions and 2 deletions

View File

@ -587,7 +587,7 @@ public class GrpcConnection extends BaseConnection implements RocksDBAPI {
var desc = statusRuntimeException.getStatus().getDescription();
var closeIndex = desc.indexOf(']');
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);
} else {
return t;

View File

@ -301,7 +301,6 @@ public class GrpcServer extends Server {
@Override
public Mono<Changed> putGetChanged(PutRequest request) {
return executeSync(() -> {
if(true) throw new RocksDBRetryException();
try (var arena = Arena.ofConfined()) {
var changed = api.put(arena,
request.getTransactionOrUpdateId(),