Skip to content

HBASE-30453 BucketCache region cached size is not decremented on eviction for non-persistent IOEngines - #8737

Merged
wchevreuil merged 2 commits into
apache:masterfrom
julianchandras:HBASE-30453
Oct 20, 2026
Merged

wchevreuil merged 2 commits into
apache:masterfrom
julianchandras:HBASE-30453

Conversation

@julianchandras

Copy link
Copy Markdown
Contributor

JIRA: https://issues.apache.org/jira/browse/HBASE-30432

regionCachedSize was decremented only in fileNotFullyCached, which blockEvicted calls only for persistent IOEngines, so offheap evictions were never subtracted. Moved the decrement into blockEvicted to mirror the increment in putIntoBackingMap.

This also fixes a double decrement in the persistent cache validation thread (evictBlock followed by fileNotFullyCached) that occurred before the fix.

Tests:

  • TestBucketCache#testRegionCachedSizeDecrementedOnEvictionForNonPersistentEngine
  • TestVerifyBucketCacheFile#testRegionCachedSizeAfterInvalidBlockEvictedOnValidation (double decrement)

@wchevreuil
wchevreuil merged commit cd8c0b3 into apache:master Oct 20, 2026
8 checks passed
wchevreuil pushed a commit that referenced this pull request Oct 20, 2026
…tion for non-persistent IOEngines (#8737)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
@julianchandras

Copy link
Copy Markdown
Contributor Author

@wchevreuil Thanks for reviewing and merging this PR and the other one!

wchevreuil pushed a commit that referenced this pull request Oct 23, 2026
…tion for non-persistent IOEngines (#8737)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
wchevreuil pushed a commit that referenced this pull request Oct 23, 2026
…tion for non-persistent IOEngines (#8737)

(cherry-picked from commit 9ce07ef)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Change-Id: I3aba89567b1a9d7e0772efc1ba4941628637cc15
wchevreuil pushed a commit that referenced this pull request Oct 23, 2026
…tion for non-persistent IOEngines (#8737)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
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.

2 participants