Closed turf00 closed 10 years ago
Hi, thanks for sharing this. This is almost certainly caused by concurrent access to the Bloom filter (not thread-safe!). Internally it uses a java MessageDigest object, which is not thread-safe and causes the error you encountered. As for now, you can use the Bloomfilters class to wrap the Bloom filter in a thread-safe Decorator (similar to Collections.synchronizedXYZ). We are currently doing a major rewrite where all Bloom filters will be inherently thread-safe and thus the above issue will not occur. We plan to release our new version of the Bloom filters next week.
During load testing of the Counting Bloom Filter inside a Spring MVC web application running in Tomcat, we see an ArrayIndexOutOfBoundsException as follows:
Our counting bloom filter is accessed concurrently to test for membership of the set and is created as follows:
Prior to starting the test we have preloaded 17 million elements.
This is with Java 7 release 40.