Github user srdo commented on a diff in the pull request:
https://github.com/apache/storm/pull/1999#discussion_r106263320
--- Diff:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java
---
@@ -383,23 +403,24 @@ private void commitOffsetsForAckedTuples() {
@Override
public void ack(Object messageId) {
final KafkaSpoutMessageId msgId = (KafkaSpoutMessageId) messageId;
- if(!emitted.contains(msgId)) {
- LOG.debug("Received ack for tuple this spout is no longer
tracking. Partitions may have been reassigned. Ignoring message [{}]", msgId);
- return;
- }
-
- if (!consumerAutoCommitMode) { // Only need to keep track of
acked tuples if commits are not done automatically
- acked.get(msgId.getTopicPartition()).add(msgId);
+ if (!emitted.contains(msgId)) {
+ LOG.debug("Received ack for message [{}], which is associated
with either a null tuple that was never emitted, " +
--- End diff --
This message is ambiguous now. Could you add the msgId to emitted before
acking (i.e. basically fake a "real" ack) instead? If people want to log that
they're dropping an invalid tuple they can do it from the RecordTranslator
without ambiguity.
---
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.
---