nicktelford commented on code in PR #22648:
URL: https://github.com/apache/kafka/pull/22648#discussion_r3473307381
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBTransactionBuffer.java:
##########
@@ -82,16 +86,21 @@ void stageToBackend(final Bytes key, final byte[] value) {
* under {@code cf}, so every staged CF is committed atomically on {@link
#commit()}.
*/
void stage(final ColumnFamilyHandle cf, final Bytes key, final byte[]
value) {
- pendingWrites.put(key, Optional.ofNullable(value));
- pendingWritesBytes += estimateKeySize(key) + (value != null ?
value.length : 0);
+ snapshotLock.writeLock().lock();
Review Comment:
@bbejeck `stage` can't be called from IQ threads, because they're read-only.
Only the owner `StreamThread` can call this method :smile:
--
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]