jon-wei commented on a change in pull request #8870: Additional Kinesis
resharding fixes
URL: https://github.com/apache/incubator-druid/pull/8870#discussion_r350567409
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java
##########
@@ -1287,6 +1299,25 @@ private void discoverTasks() throws ExecutionException,
InterruptedException, Ti
final SeekableStreamIndexTask<PartitionIdType, SequenceOffsetType>
seekableStreamIndexTask = (SeekableStreamIndexTask<PartitionIdType,
SequenceOffsetType>) task;
final String taskId = task.getId();
+ // Check if the task has any inactive partitions. If so, terminate the
task.
+ if (supportsPartitionExpiration()) {
+ boolean hasInactivePartition = false;
+ for (PartitionIdType partitionId :
seekableStreamIndexTask.getIOConfig()
+
.getStartSequenceNumbers()
+
.getPartitionSequenceNumberMap()
+ .keySet()) {
+ if (!partitionIds.contains(partitionId)) {
+ log.info("Task [%s] partition is no longer active [%s], stopping
task.", taskId, partitionId);
+ hasInactivePartition = true;
+ break;
+ }
+ }
+ if (hasInactivePartition) {
+ killTaskWithSuccess(taskId, "Task [%s] has inactive partition",
taskId);
Review comment:
Changed this area to do a set difference to detect empty partitions and now
logs all of the inactive partitions
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]