Skip to content

Commit 1b1adc5

Browse files
committed
fix
1 parent a580a1d commit 1b1adc5

File tree

1 file changed

+6
-3
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state

1 file changed

+6
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class RocksDB(
8888
@volatile private var numKeysOnLoadedVersion = 0L
8989
@volatile private var numKeysOnWritingVersion = 0L
9090
@volatile private var fileManagerMetrics = RocksDBFileManagerMetrics.EMPTY_METRICS
91-
@volatile private var acquiredThreadInfo: AcquiredThreadInfo = _
9291

9392
@GuardedBy("acquireLock")
9493
@volatile private var acquiredThreadInfo: AcquiredThreadInfo = _
@@ -303,8 +302,8 @@ class RocksDB(
303302
}
304303

305304
RocksDBMetrics(
306-
numCommittedKeys,
307-
numUncommittedKeys,
305+
numKeysOnLoadedVersion,
306+
numKeysOnWritingVersion,
308307
readerMemUsage + memTableMemUsage,
309308
totalSSTFilesBytes,
310309
nativeOpsLatencyMicros,
@@ -346,6 +345,10 @@ class RocksDB(
346345
acquireLock.notifyAll()
347346
}
348347

348+
private def getDBProperty(property: String): Long = {
349+
db.getProperty(property).toLong
350+
}
351+
349352
private def openDB(): Unit = {
350353
assert(db == null)
351354
db = NativeRocksDB.open(dbOptions, workingDir.toString)

0 commit comments

Comments
 (0)