This commit is contained in:
Andrea Cavalli 2023-04-18 19:30:18 +02:00
parent 977dd472c1
commit 7ac452d52a
2 changed files with 5 additions and 4 deletions

View File

@ -91,8 +91,8 @@ public final class OptimisticRocksDBColumn extends AbstractRocksDBColumn<Optimis
boolean committedSuccessfully;
int retries = 0;
ExponentialPageLimits retryTime = null;
Buf prevData = null;
Buf newData = null;
Buf prevData;
Buf newData;
boolean changed;
do {
var prevDataArray = tx.getForUpdate(readOptions, cfh, keyArray, true);

View File

@ -59,8 +59,8 @@ public final class PessimisticRocksDBColumn extends AbstractRocksDBColumn<Transa
}
try (var txOpts = new TransactionOptions();
var tx = beginTransaction(writeOptions, txOpts)) {
Buf prevData = null;
Buf newData = null;
Buf prevData;
Buf newData;
boolean changed;
if (logger.isTraceEnabled()) {
logger.trace(MARKER_ROCKSDB, "Reading {} (before update lock)", LLUtils.toStringSafe(key));
@ -79,6 +79,7 @@ public final class PessimisticRocksDBColumn extends AbstractRocksDBColumn<Transa
prevData = Buf.wrap(prevDataArray);
} else {
readValueNotFoundWithoutBloomBufferSize.record(0);
prevData = null;
}
if (prevData != null) {
prevData.freeze();