-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28934: Avoid waits within HFilePreadReader constructors for cache initialisation. #6389
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…he initialisation. The current implementation is such that the HFilePreadReader constructor waits for the cache initialisation to decide whether or not, to create a prefetcher for an HFile. However, as the HFilePreadReader constructor waits for the bucket cache initialisation, it blocks the region from bein opened. Any calls to read from the region fail until the cache is initialised. This prevents the region from being usable, which otherwise, can read from the data store (cloud storage) to serve the client requests. This change prevents the waits with the HFilePreadReader constructor and instead, move this wait to the prefetch thread, which waits until the cache is initialised to decide whether or, not to prefetch the file. Any requests to the regions will be served from the main data store instead of cache. Also, the missed cache access during the cache initialisation should be accounted for the cache misses. Change-Id: I952c592a1020874ad874f1909f776d8652375a1b
wchevreuil
approved these changes
Oct 23, 2024
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
Contributor
|
UT failure looks unrelated. |
wchevreuil
pushed a commit
that referenced
this pull request
Oct 25, 2024
…he initialisation. (#6389) Signed-off-by: Wellington Chevreuil <[email protected]>
wchevreuil
pushed a commit
to wchevreuil/hbase
that referenced
this pull request
Oct 25, 2024
…he initialisation. (apache#6389) Signed-off-by: Wellington Chevreuil <[email protected]>
wchevreuil
added a commit
that referenced
this pull request
Oct 28, 2024
…he initialisation. (#6389) (#6398) Signed-off-by: Wellington Chevreuil <[email protected]> Co-authored-by: jhungund <[email protected]>
stoty
pushed a commit
to stoty/hbase
that referenced
this pull request
Nov 22, 2025
… constructors for cache initialisation. (apache#6389) (apache#6398) (apache#589) Signed-off-by: Wellington Chevreuil <[email protected]> Co-authored-by: Wellington Ramos Chevreuil <[email protected]> Co-authored-by: jhungund <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation is such that the HFilePreadReader constructor waits for the cache initialisation to decide whether or not, to create a prefetcher for an HFile.
However, as the HFilePreadReader constructor waits for the bucket cache initialisation, it blocks the region from bein opened. Any calls to read from the region fail until the cache is initialised.
This prevents the region from being usable, which otherwise, can read from the data store (cloud storage) to serve the client requests.
This change prevents the waits with the HFilePreadReader constructor and instead, move this wait to the prefetch thread, which waits until the cache is initialised to decide whether or, not to prefetch the file. Any requests to the regions will be served from the main data store instead of cache.
Also, the missed cache access during the cache initialisation should be accounted for the cache misses.
Change-Id: I952c592a1020874ad874f1909f776d8652375a1b