richardstartin commented on a change in pull request #7927: URL: https://github.com/apache/pinot/pull/7927#discussion_r771823033
########## File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java ########## @@ -543,14 +550,14 @@ private void processStreamEvents(MessageBatch messagesAndOffsets, long idlePipeS _currentOffset = messagesAndOffsets.getNextStreamParitionMsgOffsetAtIndex(index); _numRowsIndexed = _realtimeSegment.getNumDocsIndexed(); - _numRowsConsumed++; streamMessageCount++; + NUM_ROWS_CONSUMED_UPDATER.incrementAndGet(this); Review comment: Concurrency bug: non atomic operation on a volatile variable with undefined results. I believe this may have resulted in the wrong number of rows in segment metadata but I haven't tracked where this value goes further than `SegmentCompletionProtocol` -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org