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

fixes #768 fix race condition in generation of table map #973

Merged
merged 1 commit into from Feb 23, 2019

Conversation

@keith-turner
Copy link
Contributor

commented Feb 20, 2019

No description provided.


public boolean isCurrent(ZooCache zc) {
return this.zooCache == zc && this.updateCount == zc.getUpdateCount();
}

This comment has been minimized.

Copy link
@milleruntime

milleruntime Feb 21, 2019

Contributor

This method is nice. Would it be better to use equals comparison?

This comment has been minimized.

Copy link
@keith-turner

keith-turner Feb 23, 2019

Author Contributor

In this case I wanted to make sure it was the exact same zoocache instance

This comment has been minimized.

Copy link
@milleruntime

milleruntime Feb 25, 2019

Contributor

Ah right, gotcha.

if (!map.isCurrent(zc)) {
instanceToMapCache.invalidate(instance.getInstanceID());
map = getTableMap(instance, zc);
}

This comment has been minimized.

Copy link
@milleruntime

milleruntime Feb 21, 2019

Contributor

Do we need to synchronize on the TableMap cache? Or does guava handle that?

This comment has been minimized.

Copy link
@keith-turner

keith-turner Feb 23, 2019

Author Contributor

Guava handles that

@keith-turner keith-turner merged commit 89cfb66 into apache:1.9 Feb 23, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@keith-turner keith-turner deleted the keith-turner:accumulo-768 branch Feb 23, 2019

@ctubbsii ctubbsii added this to Done in 1.9.3 Jun 14, 2019

@ctubbsii ctubbsii added this to Done in 2.0.0 Jun 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.