npawar commented on a change in pull request #7109:
URL: https://github.com/apache/incubator-pinot/pull/7109#discussion_r662587462



##########
File path: 
pinot-plugins/pinot-stream-ingestion/pinot-kinesis/src/main/java/org/apache/pinot/plugin/stream/kinesis/KinesisConsumer.java
##########
@@ -138,13 +143,18 @@ private KinesisRecordsBatch 
getResult(StreamPartitionMsgOffset startOffset, Stre
           }
         }
 
-        if (getRecordsResponse.hasChildShards()) {
+        if (getRecordsResponse.hasChildShards() && 
!getRecordsResponse.childShards().isEmpty()) {
           //This statement returns true only when end of current shard has 
reached.
+          // hasChildShards only checks if the childShard is null and is a 
valid instance.
           isEndOfShard = true;
           break;
         }
 
         shardIterator = getRecordsResponse.nextShardIterator();
+

Review comment:
       is there a better way to achieve this? maybe a "isShutdown" boolean?




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

Reply via email to