Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing concurrent access bug for BatchExecutor #2

Merged
merged 1 commit into from
Apr 30, 2014

Conversation

rosolovskiy
Copy link
Contributor

Hi Brian,

We discovered an issues in our system when that our business threads are hanging forever, waiting for waitTillComplete() forever. Thread and Heap dumps have shown that all BatchThread instances has complete flag True, but BatchExecutor (owner class) has it set to False.

After some tests we discovered that there is concurrent access issue in threadCompleted() method, when traversing BatchThread instances without any protection.

This fix adds volatile flag for BatchThread.complete flag, which is checked in the cycle. Initial 2 hours test has shown 0 hanged threads, we started long stability test, however I think this fix should be enough to correct the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants