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 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;

View File

@ -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(),