Copilot commented on code in PR #23728:
URL: https://github.com/apache/kafka/pull/23728#discussion_r4379156414
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java:
##########
@@ -1295,8 +1296,17 @@ void runOnceWithoutProcessingThreads() {
checkStateUpdater();
- log.debug("Processing tasks with {} iterations.",
numIterations);
- final int processed = taskManager.process(numIterations, time);
+ // maybeCommit() commits at the end of every iteration when
the uncommitted bytes exceed the limit, so
+ // they only exceed it here when that commit was skipped
(during a rebalance) or failed
+ final boolean processingPaused =
maybePauseProcessingForUncommittedBytes();
Review Comment:
With exactly-once processing, transactional stores, and caching disabled,
`Processor.init()` can buffer more than the byte limit before
`StreamTask.commitNeeded()` becomes true. This guard then blocks the processing
and punctuation that would make the task commit-eligible, while `TaskExecutor`
skips its `prepareCommit()` and `postCommit()`, leaving the entire thread
paused indefinitely even without a rebalance. Make buffered initialization
writes commit-eligible before applying this guard, and add a regression test
covering initialization writes above the limit.
--
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]