bbejeck opened a new pull request, #23182: URL: https://github.com/apache/kafka/pull/23182
`RocksDBStore.putAll` currently guards only its `synchronized (position)` block, whereas put and the read/mutate paths (`get`, `delete`, `range`, `reverseRange`, `all`, `close`) are method-synchronized on this. This isn't a correctness bug today — `AbstractTransactionBuffer` guards its `TreeMap` with its own read/write lock (owner stage() → write lock, non-owner get/scan → read lock) and `DirectDBAccessor` delegates to thread-safe RocksDB, so the buffer is protected regardless. But it leaves putAll relying on the lower layer for exclusion instead of the store-level lock every sibling uses. This PR makes putAll a synchronized method (keeping the inner synchronized (position)), matching put and removing the asymmetry. Lock ordering is unchanged — put and commit already establish this → position, and putAll follows the same order, so no new deadlock risk. No new tests: behavior is unchanged; this only widens the existing lock scope to match the sibling methods. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
