Sigma-Ma opened a new pull request, #8869: URL: https://github.com/apache/hbase/pull/8869
JIRA: https://issues.apache.org/jira/browse/HBASE-30213. ### What changes were proposed in this pull request? Maintain an atomic heap-plus-off-heap MemStore total in HRegion through the existing increment/decrement paths. Use this total for write-blocking and flush threshold checks, including WAL replay, and account for the additional counter's heap overhead. Per-component statistics, configured thresholds and the meta-region exemption remain unchanged. No public API or shared MemStoreSizing implementation is changed. ### Why are the changes needed? Heap and off-heap counters are read independently. A read spanning a flush and subsequent writes can combine values from different points in time and overestimate the total, causing a spurious RegionTooBusyException or an unnecessary flush request. The change removes these mixed-counter reads from region threshold checks. It does not make the component counters, aggregate and actual memory changes transactional. They can temporarily differ while updates overlap, and transient rejections are still possible. Once updates complete, the aggregate must equal heap plus off-heap. ### How was this patch tested? Added coverage for mixed snapshots, threshold boundaries, nonzero mixed-sign deltas, exact accounting after concurrent updates, and real BASIC/EAGER in-memory compaction and flush with heap and off-heap allocation. The tests also verify executor termination, WAL close attempts after a region close failure, and restoration of ChunkCreator.instance and chunkPoolDisabled, including when both region and WAL closure fail. ```bash mvn -o -B -ntp -pl hbase-server -PsingleJVMTests '-Dtest=TestHRegionMemStoreSizing,TestHeapSize,TestHRegion#testMemstoreSnapshotSize+testMemstoreSizeAccountingWithFailedPostBatchMutate+testFlushAndMemstoreSizeCounting+testFlushSizeAccounting+testPutWithMemStoreFlush,TestHRegionReplayEvents,TestCompactingMemStore,TestCompactingToCellFlatMapMemStore' -Dsurefire.failIfNoSpecifiedTests=true -Dsurefire.rerunFailingTestsCount=0 test spotless:check ``` -- 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]
