jon-wei commented on code in PR #15360:
URL: https://github.com/apache/druid/pull/15360#discussion_r1411330251


##########
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/KinesisRecordSupplier.java:
##########
@@ -635,23 +620,19 @@ public List<OrderedPartitionableRecord<String, String, 
ByteEntity>> poll(long ti
     start();
 
     try {
-      int expectedSize = Math.min(Math.max(records.size(), 1), 
maxRecordsPerPoll);
-
-      List<OrderedPartitionableRecord<String, String, ByteEntity>> 
polledRecords = new ArrayList<>(expectedSize);
+      
List<MemoryBoundLinkedBlockingQueue.ObjectContainer<OrderedPartitionableRecord<String,
 String, ByteEntity>>> polledRecords = new ArrayList<>();
 
-      Queues.drain(
-          records,
+      records.drain(
           polledRecords,
-          expectedSize,
+          maxBytesPerPoll,

Review Comment:
   What happens if a single record is larger than maxBytePerPoll? Would this 
get stuck and make no progress? 



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