RocksDBStateStore¶
RocksDBStateStore
is a StateStore of RocksDBStateStoreProvider.
Creating Instance¶
RocksDBStateStore
takes the following to be created:
- Version
RocksDBStateStore
is created when:
RocksDBStateStoreProvider
is requested for the StateStore (for the version)
Performance Metrics¶
metrics: StateStoreMetrics
metrics
is part of the StateStore abstraction.
metrics
requests the RocksDB for the metrics and defines StateStoreCustomMetric
s.
In the end, metrics
creates a StateStoreMetrics with the following:
- numUncommittedKeys of the RocksDBMetrics
- totalMemUsageBytes of the RocksDBMetrics
- The
StateStoreCustomMetric
s
RocksDB: commit - compact time¶
rocksdbCommitCompactLatency
is the compact
entry in the lastCommitLatencyMs
RocksDB: commit - file sync to external storage time¶
rocksdbCommitFileSyncLatencyMs
is the fileSync
entry in the lastCommitLatencyMs
RocksDB: compaction - total compaction time including background¶
rocksdbTotalCompactionLatencyMs
is the sum on compaction
entry in the nativeOpsHistograms
RocksDB: number of get calls¶
rocksdbGetCount
is the count on get
entry in the nativeOpsHistograms
RocksDB: number of put calls¶
rocksdbPutCount
is the count on put
entry in the nativeOpsHistograms
RocksDB: total get call latency¶
rocksdbGetLatency
is the sum on get
entry in the nativeOpsHistograms
RocksDB: total put call latency¶
rocksdbPutLatency
is the sum on put
entry in the nativeOpsHistograms
Committing State Changes¶
commit(): Long
commit
is part of the StateStore abstraction.
commit
requests the RocksDB to commit state changes (that, in the end, gives a new version).
commit
sets the state to COMMITTED
.
commit
prints out the following INFO message to the logs:
Committed [newVersion] for [id]
In the end, commit
returns the new version (from committing state changes).