Uh oh!
There was an error while loading. Please reload this page.
HBASE-28742 Fixes NPE for CompactionTool when mslab enabled - #6097
Conversation
Apache-HBase
commented
Jul 19, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 19, 2024
🎊 +1 overall
This message was automatically generated. |
vineet4008
commented
Jul 19, 2024
@Apache9@bbeaudreault Please review |
Apache9
commented
Jul 19, 2024
So, if memstore lab is enabled, and we actually has a memstore, but there is no problem if we do not initialize the memstore chunk, but there will be an NPE while closing the memstore? Seems really strange... Do we really need memstore in CompactionTool? If not, I think we can just disable memstore lab to fix the problem for now? |
vineet4008
commented
Jul 19, 2024
Yes, memstore lab can be disabled. Have pushed the fix. |
Apache-HBase
commented
Jul 19, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 19, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 19, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 19, 2024
🎊 +1 overall
This message was automatically generated. |
Apache9
commented
Jul 21, 2024
Do we have a test for CompactionTool? I'm not very familiar with the code so I'm not sure whether it will use memstore, I guess it will not use, but better has a test to confirm this. Thanks. |
Apache-HBase
commented
Jul 22, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 22, 2024
🎊 +1 overall
This message was automatically generated. |
vineet4008
commented
Jul 22, 2024
Added Test to validate the issue and fix |
| * Test the issue of HBASE-28472 | ||
| */ | ||
| @Category({ MediumTests.class, RegionServerTests.class }) | ||
| public class TestCompactionToolNpeFix extends TestCompactionTool { |
There was a problem hiding this comment.
Do we really need to extends TestCompactionTool? Do we need to run the test in the parent class twice?
There was a problem hiding this comment.
Thanks @Apache9 for review.
In TestCompactionTool, when system is started with mslab enabled, then ChunkCreator is created and initialized. So when test case runs CompactionTool, it does not report NPE.
To reproduce the issue, setting mslab to disabled in derived class, and then base test fails with NPE as ChunkCreator is NULL.
There was a problem hiding this comment.
Then we can just change TestCompactionTool Parameterized? What is the purpose for the newly added test method?
There was a problem hiding this comment.
Other test case is added to test the CompactionTool MapReduce flow. Existing test case verifies the Non MapReduce flow.
There was a problem hiding this comment.
Then I think we should first change TestCompactionTool Parameterized, and then introduce a new tests? The current architecture seems really strange...
There was a problem hiding this comment.
Changed TestCompactionTool to Parameterized and added new cases in the same test file.
Apache-HBase
commented
Jul 23, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 23, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 25, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jul 25, 2024
🎊 +1 overall
This message was automatically generated. |
Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Pankaj Kumar <pankajkumar@apache.org> (cherry picked from commit 43b1d78)
Fixes NPE issue with initialization of ChunkCreator by disabling the mslab