jfarr commented on a change in pull request #11090: [BEAM-9470] 
:sdks:java:io:kinesis:test is flaky
URL: https://github.com/apache/beam/pull/11090#discussion_r393222652
 
 

 ##########
 File path: 
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/ShardReadersPool.java
 ##########
 @@ -126,9 +126,21 @@ void startReadingShards(Iterable<ShardRecordsIterator> 
shardRecordsIterators) {
   private void readLoop(ShardRecordsIterator shardRecordsIterator, 
RateLimitPolicy rateLimiter) {
 
 Review comment:
   I don't see an inherent problem with it, as long as the rate limiter is 
thread-safe it can be shared. If you want I could add a note in the Javadoc for 
RateLimitPolicyFactory to indicate that it will be used from multiple threads, 
so if it returns a singleton instance of RateLimitPolicy then that instance 
should be thread-safe, otherwise it should return separate RateLimitPolicy 
instances.

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


With regards,
Apache Git Services

Reply via email to