keith-turner opened a new pull request, #5756:
URL: https://github.com/apache/accumulo/pull/5756
Fixes the following race condition.
1. Thread 1 reads the cache and finds it stale/missing
2. Thread 2 reads the cache and finds it stale/missing
3. Thread 2 goes through the entire process of reading metadata and
updating the cache
4. Thread 1 does the pre lock read of the cache (this reread of the cache
causes the race condition).
5. Thread 1 does the post lock read of the cache and finds its the same and
unessecairly reads the metadata table
This change avoids reading from the cache twice before locking and updating
and only reads once. This way the cache entry used to make a decision after
the lock is obtianed is the same one that was seen as stale.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]