-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
[SPARK-13833] Guard against race condition when re-caching disk blocks in memory #11660
Conversation
/cc @andrewor14. In addition to fixing that race-condition, this patch also addresses that duplicated code that you pointed out in a review of my previous PR. |
* Attempts to cache spilled bytes read from disk into the MemoryStore in order to speed up | ||
* subsequent reads. This method requires the caller to hold a read lock on the block. | ||
* | ||
* @return a copy of the bytes. The original byes passed this method should no longer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
byes
Test build #52953 has finished for PR 11660 at commit
|
Test build #52965 has finished for PR 11660 at commit
|
@andrewor14 did you have any other comments here or is this ready to merge? |
Sorry, merging now. |
…s in memory When reading data from the DiskStore and attempting to cache it back into the memory store, we should guard against race conditions where multiple readers are attempting to re-cache the same block in memory. This patch accomplishes this by synchronizing on the block's `BlockInfo` object while trying to re-cache a block. (Will file JIRA as soon as ASF JIRA stops being down / laggy). Author: Josh Rosen <joshrosen@databricks.com> Closes apache#11660 from JoshRosen/concurrent-recaching-fixes.
…s in memory When reading data from the DiskStore and attempting to cache it back into the memory store, we should guard against race conditions where multiple readers are attempting to re-cache the same block in memory. This patch accomplishes this by synchronizing on the block's `BlockInfo` object while trying to re-cache a block. (Will file JIRA as soon as ASF JIRA stops being down / laggy). Author: Josh Rosen <joshrosen@databricks.com> Closes apache#11660 from JoshRosen/concurrent-recaching-fixes.
When reading data from the DiskStore and attempting to cache it back into the memory store, we should guard against race conditions where multiple readers are attempting to re-cache the same block in memory.
This patch accomplishes this by synchronizing on the block's
BlockInfo
object while trying to re-cache a block.(Will file JIRA as soon as ASF JIRA stops being down / laggy).