kfaraz commented on a change in pull request #12235:
URL: https://github.com/apache/druid/pull/12235#discussion_r808620269
##########
File path:
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisor.java
##########
@@ -88,6 +91,11 @@
private final AWSCredentialsConfig awsCredentialsConfig;
private volatile Map<String, Long> currentPartitionTimeLag;
+ // Maintain sets of currently closed shards to find "bad" (closed and empty)
shards
+ // Poll closed shards once and store the result to avoid redundant costly
calls to kinesis
+ private final Set<String> emptyClosedShardIds = new TreeSet<>();
Review comment:
Thanks for pointing this out, @zachjsh.
This code would be executed by the `SeekableStreamSupervisor` while
executing a `RunNotice` (scheduled when status of a task changes) as well as a
`DynamicAllocationTasksNotice` (scheduled for auto-scaling). There is a
possibility of contention between these two executions.
I think a ConcurrentHashSet would suffice here.
cc: @AmatyaAvadhanula
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]