Update rocksdb
This commit is contained in:
parent
faa15d64ce
commit
0e2b3677c4
2
pom.xml
2
pom.xml
@ -14,7 +14,7 @@
|
||||
<dbengine.ci>false</dbengine.ci>
|
||||
<micrometer.version>1.10.4</micrometer.version>
|
||||
<lucene.version>9.7.0</lucene.version>
|
||||
<rocksdb.version>8.1.1.1</rocksdb.version>
|
||||
<rocksdb.version>8.3.2</rocksdb.version>
|
||||
<junit.jupiter.version>5.9.0</junit.jupiter.version>
|
||||
<data.generator.version>1.0.10</data.generator.version>
|
||||
</properties>
|
||||
|
@ -60,7 +60,8 @@ public enum RocksDBLongProperty implements RocksDBProperty {
|
||||
NUM_BLOB_FILES("num-blob-files"),
|
||||
TOTAL_BLOB_FILE_SIZE("total-blob-file-size"),
|
||||
LIVE_BLOB_FILE_SIZE("live-blob-file-size"),
|
||||
LIVE_BLOB_FILE_GARBAGE_SIZE("live-blob-file-garbage-size")
|
||||
LIVE_BLOB_FILE_GARBAGE_SIZE("live-blob-file-garbage-size"),
|
||||
FILE_READ_DB_OPEN_MICROS("file.read.db.open.micros")
|
||||
;
|
||||
|
||||
private final String name;
|
||||
|
@ -2,6 +2,10 @@ package it.cavallium.dbengine.database;
|
||||
|
||||
public interface RocksDBProperty {
|
||||
|
||||
/**
|
||||
* Get rocksdb property name
|
||||
* @return name, with the "rocksdb." prefix included
|
||||
*/
|
||||
String getName();
|
||||
|
||||
boolean isNumeric();
|
||||
|
@ -28,6 +28,7 @@ import it.cavallium.dbengine.database.LLRange;
|
||||
import it.cavallium.dbengine.database.LLSnapshot;
|
||||
import it.cavallium.dbengine.database.LLUtils;
|
||||
import it.cavallium.dbengine.database.OptionalBuf;
|
||||
import it.cavallium.dbengine.database.RocksDBLongProperty;
|
||||
import it.cavallium.dbengine.database.SerializedKey;
|
||||
import it.cavallium.dbengine.database.UpdateMode;
|
||||
import it.cavallium.dbengine.database.UpdateReturnMode;
|
||||
@ -976,7 +977,7 @@ public class LLLocalDictionary implements LLDictionary {
|
||||
if (USE_NUM_ENTRIES_PRECISE_COUNTER) {
|
||||
return getRocksDBNumEntries();
|
||||
}
|
||||
return db.getLongProperty("rocksdb.estimate-num-keys");
|
||||
return db.getLongProperty(RocksDBLongProperty.ESTIMATE_NUM_KEYS.getName());
|
||||
} catch (RocksDBException e) {
|
||||
logger.error(MARKER_ROCKSDB, "Failed to get RocksDB estimated keys count property", e);
|
||||
return 0;
|
||||
|
@ -1260,13 +1260,13 @@ public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDa
|
||||
try {
|
||||
if (closeRequested || closed || closeReadLock == 0) return null;
|
||||
ensureOpen();
|
||||
return new MemoryStats(db.getAggregatedLongProperty("rocksdb.estimate-table-readers-mem"),
|
||||
db.getAggregatedLongProperty("rocksdb.size-all-mem-tables"),
|
||||
db.getAggregatedLongProperty("rocksdb.cur-size-all-mem-tables"),
|
||||
db.getAggregatedLongProperty("rocksdb.estimate-num-keys"),
|
||||
db.getAggregatedLongProperty("rocksdb.block-cache-usage") / this.handles.size(),
|
||||
db.getAggregatedLongProperty("rocksdb.block-cache-pinned-usage") / this.handles.size(),
|
||||
db.getAggregatedLongProperty("rocksdb.num-live-versions") / this.handles.size()
|
||||
return new MemoryStats(db.getAggregatedLongProperty(RocksDBLongProperty.ESTIMATE_TABLE_READERS_MEM.getName()),
|
||||
db.getAggregatedLongProperty(RocksDBLongProperty.SIZE_ALL_MEM_TABLES.getName()),
|
||||
db.getAggregatedLongProperty(RocksDBLongProperty.CUR_SIZE_ALL_MEM_TABLES.getName()),
|
||||
db.getAggregatedLongProperty(RocksDBLongProperty.ESTIMATE_NUM_KEYS.getName()),
|
||||
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_USAGE.getName()) / this.handles.size(),
|
||||
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_PINNED_USAGE.getName()) / this.handles.size(),
|
||||
db.getAggregatedLongProperty(RocksDBLongProperty.NUM_LIVE_VERSIONS.getName()) / this.handles.size()
|
||||
);
|
||||
} catch (RocksDBException e) {
|
||||
throw new DBException("Failed to read memory stats", e);
|
||||
|
Loading…
Reference in New Issue
Block a user