Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Attempt at #SERVER-86 -- ConcurrentModificationException #64
Hi Lennart & All,
This is my attempt at fixing #SERVER-86.
--I have combined methods getCount() and reset() into one method named getCountAndReset().
I am really new at multi-threaded code. Hope to learn something here. :)
Thansk you very much, but there is a simpler way... :) http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html
Fixed in: c185fd0
Thanks for contributing anyways :)
I ran the test I wrote against the current fix (out of curiosity, since the test is already written), and I found the test failure output below:
The same test passed consistently against the version I submitted.
I am not sure which part is making the difference (and which part is not :P). Items I can list are:
One scenario I can think of that can potentially cause the failure, is related to item (1) above.
I appreciate your review of my submit. I understand that this issue might not be as critical as some other issues (if looking into this issue takes up more time). I am already enjoying all the improvements going on in this project. :)