Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.0.0-alpha.7
-
None
-
None
-
1
Description
The code currently assumes System.nanoTime is positive and never overflows.
From the System.nanoTime() javadoc:
To compare two nanoTime values
|
|
long t0 = System.nanoTime();
|
...
|
long t1 = System.nanoTime();
|
|
one should use t1 - t0 < 0, not t1 < t0, because of the possibility of numerical overflow.
|
Attachments
For Gerrit Dashboard: JCBC-1432 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
114191,4 | JCBC-1432 LazyCircuitBreaker does not handle System.nanoTime overflow | master | couchbase-jvm-clients | Status: MERGED | +2 | +1 |