You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/02 18:37:11 UTC
[GitHub] surekhasaharan commented on a change in pull request #6496: Support
kafka transactional topics (#5404)
surekhasaharan commented on a change in pull request #6496: Support kafka transactional topics (#5404)
URL: https://github.com/apache/incubator-druid/pull/6496#discussion_r244815662
##########
File path: extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/IncrementalPublishingKafkaIndexTaskRunner.java
##########
@@ -576,15 +561,19 @@ public void onFailure(Throwable t)
nextOffsets.put(record.partition(), record.offset() + 1);
}
-
- if (nextOffsets.get(record.partition()).equals(endOffsets.get(record.partition()))
+ if (nextOffsets.get(record.partition()) >= endOffsets.get(record.partition())
&& assignment.remove(record.partition())) {
log.info("Finished reading topic[%s], partition[%,d].", record.topic(), record.partition());
KafkaIndexTask.assignPartitions(consumer, topic, assignment);
stillReading = !assignment.isEmpty();
}
}
-
+ if (nextOffsets.get(currentPartition) != null
Review comment:
Thanks, inside the loop `nextOffsets` is updated by `nextOffsets.put(record.partition(), record.offset() + 1);` That said, let me double check, I'm a little rusty on this PR now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org