Description
I was working on SOLR-6485 when I realized that the first time pause is called even if we write a lot of bytes pause doesn't work correctly because in SimpleRateLimiter.pause() lastNS is 0 and startNS is always more than targetNS.
If we remove the following line from TestRateLimiter.testPause() then the test fails -
limiter.pause(2);//init
Should we do one of the following ?
1. Initialize lastNS in the ctor
lastNS = System.nanoTime();
2. Add a method saying start() which does the same
Attachments
Attachments
Issue Links
- blocks
-
SOLR-6485 ReplicationHandler should have an option to throttle the speed of replication
- Closed