Uh oh!
There was an error while loading. Please reload this page.
HBASE-28811 Use region server configuration for evicting the cache wh… - #6197
Conversation
Apache-HBase
commented
Sep 4, 2024
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 4, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 4, 2024
🎊 +1 overall
This message was automatically generated. |
wchevreuil
left a comment
There was a problem hiding this comment.
Can we add UT for the changed behaviour? Something similar to TestSplitWithCache, but start with a given value for evictOnClose, change it for RSes only, trigger a region close, check the cache:
- Set evictOnClose to false:
UTIL.getConfiguration().setBoolean(EVICT_BLOCKS_ON_CLOSE_KEY, false); - Start cluster:
UTIL.startMiniCluster(1); - Change the config for the RS only:
UTIL.getMiniHBaseCluster().getRegionServer(0).getConfiguration().setBoolean(EVICT_BLOCKS_ON_CLOSE_KEY, true); - Disable table:
UTIL.getAdmin().disableTable(); - Check blocks got evicted:
| private void closeRegionAfterUpdatingMeta(MasterProcedureEnv env, RegionStateNode regionNode) { | ||
| CloseRegionProcedure closeProc = | ||
| LOG.debug("Close region: isSplit: {}: evictOnClose: {}", isSplit, | ||
| isSplit |
There was a problem hiding this comment.
Nit: this log is misleading, we should just pass the evictCache valure for evictOnClose.
Uh oh!
There was an error while loading. Please reload this page.
Apache-HBase
commented
Sep 4, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 4, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 4, 2024
🎊 +1 overall
This message was automatically generated. |
ragarkar
commented
Sep 5, 2024
Added the unit test TestUseRSCacheConfigWhileClosingRegion.java |
wchevreuil
left a comment
There was a problem hiding this comment.
The UT seems correct, but let's refrain from duplicating code whenever possible. Please move these new tests to TestSplitWithCache, and reuse as much of the code from there.
ragarkar
commented
Sep 5, 2024
Refactored the unit test and renamed TestSplitWithCache to TestCacheEviction. The new test can be used to test other eviction scenarios in the future. |
Apache-HBase
commented
Sep 5, 2024
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 5, 2024
💔 -1 overall
This message was automatically generated. |
…ile unassigning a region
Apache-HBase
commented
Sep 6, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Sep 6, 2024
🎊 +1 overall
This message was automatically generated. |
…ile unassigning a region (#6197) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…ile unassigning a region (apache#6197) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> (cherry picked from commit 888e4dd)
…evicting the cache while unassigning a region (apache#6197) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> (cherry picked from commit 888e4dd)
…evicting the cache while unassigning a region (apache#6197) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> (cherry picked from commit 888e4dd)
…ile unassigning a region