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


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/RecordSupplierInputSource.java:
##########
@@ -123,13 +129,23 @@ CloseableIterator<InputEntity> createEntityIterator()
       private Iterator<OrderedPartitionableRecord<PartitionIdType, 
SequenceOffsetType, RecordType>> recordIterator;
       private Iterator<? extends ByteEntity> bytesIterator;
       private volatile boolean closed;
+      private long createTime = System.currentTimeMillis();
+      private Long terminationTime = samplerConfigTimeoutMs != null ? 
createTime + samplerConfigTimeoutMs : null;

Review Comment:
   Changed it back to a nullable Integer to indicate no timeout, I think it's a 
clearer indicator than timeout<=0, and easier to add a deterministic test for 
the timeout (using a negative timeout value).
   
   SamplerConfig.timeoutMs already had the convention of "0 or less indicates 
no timeout" so I kept that when constructing the RecordSupplierInputSource from 
the sampler spec.



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