Skip to content

Commit 9d6e603

Browse files
author
Ubuntu
committed
address comment
1 parent 1ac1e8a commit 9d6e603

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,22 @@ object RocksDBMemoryManager extends Logging with UnmanagedMemoryConsumer {
125125
* Get the pinned blocks memory usage for a specific instance, accounting for bounded memory
126126
* sharing.
127127
* @param uniqueId The instance's unique identifier
128-
* @param globalPinnedUsage The total pinned usage from the cache
128+
* @param totalPinnedUsage The total pinned usage from the cache
129129
* @return The adjusted pinned blocks memory usage accounting for sharing in bounded memory mode
130130
*/
131131
def getInstancePinnedBlocksMemUsage(
132132
uniqueId: String,
133-
pinnedUsage: Long): Long = {
133+
totalPinnedUsage: Long): Long = {
134134
val instanceInfo = instanceMemoryMap.
135135
getOrDefault(uniqueId, InstanceMemoryInfo(0L, isBoundedMemory = false))
136136
if (instanceInfo.isBoundedMemory) {
137137
// In bounded memory mode, divide by the number of bounded instances
138138
// since they share the same cache
139139
val numBoundedInstances = getNumRocksDBInstances(true /* boundedMemory */)
140-
pinnedUsage / numBoundedInstances
140+
totalPinnedUsage / numBoundedInstances
141141
} else {
142142
// In unbounded memory mode, each instance has its own cache
143-
pinnedUsage
143+
totalPinnedUsage
144144
}
145145
}
146146

0 commit comments

Comments
 (0)