From 87c031fe711411849f0cc075c15af57cb0321977 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sun, 27 Mar 2022 01:22:20 +0100 Subject: [PATCH] Update to rocksdb 7 --- pom.xml | 6 +---- .../disk/LLLocalKeyValueDatabase.java | 1 - .../disk/UnmodifiableReadOptions.java | 5 ---- .../java/org/rocksdb/CappedWriteBatch.java | 24 ++++--------------- 4 files changed, 6 insertions(+), 30 deletions(-) diff --git a/pom.xml b/pom.xml index a181dd2..91274a7 100644 --- a/pom.xml +++ b/pom.xml @@ -135,11 +135,6 @@ disruptor test - - org.rocksdb - rocksdbjni - 6.28.2 - org.apache.lucene lucene-core @@ -335,6 +330,7 @@ org.rocksdb rocksdbjni + 7.0.3 org.apache.lucene diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java index 1847946..be22e6c 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java @@ -454,7 +454,6 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase { } else { options.setDelayedWriteRate(64 * SizeUnit.MB); } - options.setNewTableReaderForCompactionInputs(true); options.setCreateIfMissing(true); options.setSkipStatsUpdateOnDbOpen(true); options.setCreateMissingColumnFamilies(true); diff --git a/src/main/java/it/cavallium/dbengine/database/disk/UnmodifiableReadOptions.java b/src/main/java/it/cavallium/dbengine/database/disk/UnmodifiableReadOptions.java index 6c1afc5..5674e8d 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/UnmodifiableReadOptions.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/UnmodifiableReadOptions.java @@ -92,11 +92,6 @@ public class UnmodifiableReadOptions extends ReadOptions { throw uoe(); } - @Override - public ReadOptions setIterStartSeqnum(long l) { - throw uoe(); - } - @Override public ReadOptions setTableFilter(AbstractTableFilter abstractTableFilter) { throw uoe(); diff --git a/src/main/java/org/rocksdb/CappedWriteBatch.java b/src/main/java/org/rocksdb/CappedWriteBatch.java index fbd4474..d24e177 100644 --- a/src/main/java/org/rocksdb/CappedWriteBatch.java +++ b/src/main/java/org/rocksdb/CappedWriteBatch.java @@ -142,20 +142,6 @@ public class CappedWriteBatch extends WriteBatch { flushIfNeeded(false); } - @Deprecated - @Override - public synchronized void remove(byte[] key) throws RocksDBException { - super.remove(key); - flushIfNeeded(false); - } - - @Deprecated - @Override - public synchronized void remove(ColumnFamilyHandle columnFamilyHandle, byte[] key) throws RocksDBException { - super.remove(columnFamilyHandle, key); - flushIfNeeded(false); - } - @Override public synchronized void delete(byte[] key) throws RocksDBException { super.delete(key); @@ -173,7 +159,7 @@ public class CappedWriteBatch extends WriteBatch { if (USE_FAST_DIRECT_BUFFERS && isReadOnlyDirect(key)) { ByteBuffer keyNioBuffer = ((ReadableComponent) key).readableBuffer(); buffersToRelease.add(key); - remove(columnFamilyHandle, keyNioBuffer); + delete(columnFamilyHandle, keyNioBuffer); } else { try { super.delete(columnFamilyHandle, LLUtils.toArray(key)); @@ -197,14 +183,14 @@ public class CappedWriteBatch extends WriteBatch { } @Override - public synchronized void remove(ByteBuffer key) throws RocksDBException { - super.remove(key); + public synchronized void delete(ByteBuffer key) throws RocksDBException { + super.delete(key); flushIfNeeded(false); } @Override - public synchronized void remove(ColumnFamilyHandle columnFamilyHandle, ByteBuffer key) throws RocksDBException { - super.remove(columnFamilyHandle, key); + public synchronized void delete(ColumnFamilyHandle columnFamilyHandle, ByteBuffer key) throws RocksDBException { + super.delete(columnFamilyHandle, key); flushIfNeeded(false); }