Comments (6)
I should have said it seems to happen inside AbstractHistogram#add, as I can't make it happen during debug, but I was able to "restrict" the area to some application code that loops over a concurrentskiplistmap tail view and does the AbstractHistogram#add.
from hdrhistogram.
After reviewing the AbstractHistogram#add code it was clear that the AIOOBE could have not come from there, and the source is indeed AbstractHistogramIterator#next, called a few lines after when computing the mean of the aggregated histogram.
So, I was able to pin down the bug back into AbstractHistogram#add, which computes an higher total count in case of concurrently modified "from" histograms: pull request #25 should fix it.
from hdrhistogram.
This is integrated into the recently pushed v2.0.1
from hdrhistogram.
@giltene thanks! I'm going to upgrade to v2.0.2 to see if that helps
from hdrhistogram.
Going back to the original way you use this stuff though, I think you may want to start using IntervalHistogramRecorder instead of doing potentially lossy adds on live atomic histograms. IntervalHistogramRecorder guarantees a stable view of the interval histogram, and avoids exposure to concurrent modifications.
With this feature now available, I'm considering whether throwing a concurrent modification exception is not the better way to go when such a copy creates an inconsistent totalCount. We can use the current (your) logic that establishes the totalCount during the loop to cross-check agains the other totalCount, and throw an exception when they don't match.
What do you think?
from hdrhistogram.
Thanks for the heads up @giltene. I will look into IntervalHistogramRecorder, but I think you should keep the current exception-free behaviour: after all, the atomic histograms are the ones concurrently modified (and they are meant to be so), while the add to target histogram is single threaded, so a ConcurrentModificationException would be imho unexpected.
from hdrhistogram.
Related Issues (20)
- Output formats and what produces the text output format? HOT 18
- Oops. Mistaken post.
- build errors in intellij HOT 3
- hdrhistogram measurement type with YCSB gives error with java 11 java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter Error HOT 1
- DoubleHistogram.getMaxValue() may return a value less than the recorded value HOT 1
- java.lang.IndexOutOfBoundsException on Java 8 HOT 1
- Automatic-Module-Name attribute HOT 2
- Link to "Plot histogram file(s)" is broken on http://www.hdrhistogram.org/ HOT 1
- HdrHistogram/plotFiles not interactive anymore HOT 1
- ArrayIndexOutOfBounds in DoubleHistogram.recordValue HOT 2
- OSS-Fuzz integration of HdrHistogram HOT 3
- Histograms are no longer as accurate in 2.1.10 HOT 2
- Support for GraalVMs native-image
- Zero allocation decodeFromByteBuffer
- java.lang.ArrayIndexOutOfBoundsException HOT 2
- Updating hdrhistogram.org with swift port HOT 11
- encodeIntoCompressedByteBuffer silently truncates the encoded form HOT 1
- Base64Helper.java using javax.* HOT 2
- plotFiles.html doesn't support multiple files
- Lock contention observed in DoubleHistogram class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hdrhistogram.