suneet-s commented on a change in pull request #10315:
URL: https://github.com/apache/druid/pull/10315#discussion_r476149085



##########
File path: 
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/KinesisRecordSupplier.java
##########
@@ -718,9 +718,11 @@ public String 
getEarliestSequenceNumber(StreamPartition<String> partition)
   {
     Map<String, Long> partitionLag = 
Maps.newHashMapWithExpectedSize(currentOffsets.size());
     for (Map.Entry<String, String> partitionOffset : 
currentOffsets.entrySet()) {
-      StreamPartition<String> partition = new StreamPartition<>(stream, 
partitionOffset.getKey());
-      long currentLag = getPartitionTimeLag(partition, 
partitionOffset.getValue());
-      partitionLag.put(partitionOffset.getKey(), currentLag);
+      if 
(KinesisSequenceNumber.isValidAWSKinesisSequence(partitionOffset.getValue())) {

Review comment:
       Can we add some tests for this? I don't know if we can simulate this 
scenario in an integration test, but can we add a unit test for this

##########
File path: 
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/KinesisSequenceNumber.java
##########
@@ -62,7 +62,9 @@
   private KinesisSequenceNumber(String sequenceNumber, boolean isExclusive)
   {
     super(sequenceNumber, isExclusive);
-    if (END_OF_SHARD_MARKER.equals(sequenceNumber) || 
NO_END_SEQUENCE_NUMBER.equals(sequenceNumber)) {
+    if (END_OF_SHARD_MARKER.equals(sequenceNumber)
+        || NO_END_SEQUENCE_NUMBER.equals(sequenceNumber)
+        || EXPIRED_MARKER.equals(sequenceNumber)) {

Review comment:
       nit: use `isValidAWSKinesisSequence` instead
   ```suggestion
       if (!isValidAWSKinesisSequence(sequenceNumber)) {
   ```




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to