kfaraz commented on a change in pull request #12235:
URL: https://github.com/apache/druid/pull/12235#discussion_r808647249
##########
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:
Synchronizing the whole method `updateClosedShardCache` would actually
be preferable because the state returned by two subsequent calls to
`recordSupplier.getShards()` can be different.
So this call should happen inside the synchronized block, as should the
calls to `recordSupplier.isClosedShardEmpty()`.
I hope this doesn't cause bottlenecks though.
--
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]