Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: core/store
-
Labels:None
-
Lucene Fields:New
Description
SimpleRateLimiter.pause() uses an uncheck cast of longs to ints:
Thread.sleep((int) (pauseNS/1000000), (int) (pauseNS % 1000000));
Although we check that pauseNS is positive, however if it's large enough the cast to int produces a negative value, causing Thread.sleep to throw an exception.
We should protect for it.