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

ACCUMULO-4502 Added volative to some class members to mitigate issues… #179

Closed
wants to merge 1 commit into from
Closed

ACCUMULO-4502 Added volative to some class members to mitigate issues… #179

wants to merge 1 commit into from

Conversation

ivakegg
Copy link
Contributor

@ivakegg ivakegg commented Nov 4, 2016

… when one thread seeks the iterator, and another thread is reading it.

… when one thread seeks the iterator, and another thread is reading it.
@ivakegg
Copy link
Contributor Author

ivakegg commented Nov 4, 2016

After an exhaustive search through this code, the only reason I can come up with is an issue with a member reference in the underlying HeapIterator. The scenario would be as follows:

thread 1: calls hasTop() which is invoked on then in memory data source
thread 2: calls switchSource which sets up the new datasource and calls seek which results in topIdx being set
thread1: calls next() which gets a value of null for topIdx

So if topIdx is marked as volatile then this should not happen.

@ivakegg ivakegg closed this Nov 9, 2016
@ivakegg ivakegg deleted the ACCUMULO-4502 branch November 9, 2016 20:52
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.

None yet

1 participant