Skip to content

Fix race condition in Tables. Closes #768#970

Closed
milleruntime wants to merge 1 commit intoapache:masterfrom
milleruntime:tableMap-race-condition
Closed

Fix race condition in Tables. Closes #768#970
milleruntime wants to merge 1 commit intoapache:masterfrom
milleruntime:tableMap-race-condition

Conversation

@milleruntime
Copy link
Copy Markdown
Contributor

This basically reverts the extra cacheing of the ZooCache that was added in 1.9.

final String zks = context.getZooKeepers();
final int timeOut = context.getZooKeepersSessionTimeOut();
return new ZooCacheFactory().getZooCache(zks, timeOut,
watchedEvent -> instanceToMapCache.invalidate(uuid));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is very important, it clears the map when zoocache changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh right. The TableMap in another process won't get updated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #973 as an alternate way to do this. It was too hard to explain and easier to write the code.

@milleruntime
Copy link
Copy Markdown
Contributor Author

Closing in favor of #973

@ctubbsii ctubbsii removed the v2.0.0 label Feb 21, 2019
@milleruntime milleruntime deleted the tableMap-race-condition branch February 25, 2019 18:36
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.

4 participants