hlteoh37 commented on code in PR #166:
URL:
https://github.com/apache/flink-connector-aws/pull/166#discussion_r1762616322
##########
flink-connector-aws/flink-connector-dynamodb/src/main/java/org/apache/flink/connector/dynamodb/source/enumerator/tracker/SplitTracker.java:
##########
@@ -250,6 +252,24 @@ public Set<String> getKnownSplitIds() {
return knownSplits.keySet();
}
+ public List<Shard> getKnownShards() {
+ return knownSplits
+ .values()
+ .parallelStream()
+ .filter(
+ split ->
+
!ShardUtils.isShardOlderThanInconsistencyDetectionRetentionPeriod(
+ split.splitId()))
+ .map(
+ split ->
+ Shard.builder()
+ .shardId(split.splitId())
+
.parentShardId(split.getParentShardId())
+
.sequenceNumberRange(SequenceNumberRange.builder().build())
+ .build())
Review Comment:
How does this work with the inconsistency tracker? Don't we use the sequence
number to detect open/closed shards?
--
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]