GitHub user XuMingmin opened a pull request:
https://github.com/apache/storm/pull/1863
fix: KafkaSpout is blocked in AutoCommitMode
What's the issue?
When Storm topology is run on 'At-Most-Once' mode, with ack executor=0,
KafkaSpout cannot emit records after some time.
What's the cause?
Function poll() controls whether it need to pull more data from Kafka
cluster. With the condition `!waitingToEmit() && numUncommittedOffsets <
maxUncommittedOffsets`, it's always `FALSE` after reaching threshold, as
`numUncommittedOffsets` is creasing and never reset on 'At-Most-Once' mode.
What's the solution?
I change the condition to `!waitingToEmit() && (numUncommittedOffsets <
maxUncommittedOffsets || consumerAutoCommitMode)`, that return `TRUE` with
AutoCommitMode regarding of UnCommittedOffset, see the comments inline.
Also, it's not required to track emitted(msgId) and numUncommittedOffsets
with AutoCommitMode .
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/XuMingmin/storm master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/1863.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1863
----
commit f3c9985e26868fa52cee34335f70550c4f7744c4
Author: XuMingmin <[email protected]>
Date: 2017-01-05T19:31:42Z
fix: KafkaSpout is blocked in AutoCommitMode
What's the issue?
When Storm topology is run on 'At-Most-Once' mode, with ack executor=0,
KafkaSpout cannot emit records after some time.
What's the cause?
Function poll() controls whether it need to pull more data from Kafka
cluster. With the condition `!waitingToEmit() && numUncommittedOffsets <
maxUncommittedOffsets`, it's always `FALSE` after reaching threshold, as
`numUncommittedOffsets` is creasing and never reset on 'At-Most-Once' mode.
What's the solution?
I change the condition to `!waitingToEmit() && (numUncommittedOffsets <
maxUncommittedOffsets || consumerAutoCommitMode)`, that return `TRUE` with
AutoCommitMode regarding of UnCommittedOffset, see the comments inline.
Also, it's not required to track emitted(msgId) and numUncommittedOffsets
with AutoCommitMode .
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---