Uh oh!
There was an error while loading. Please reload this page.
HBASE-27788 Skip family comparing when compare cells inner the store - #5171
Conversation
This comment has been minimized.
This comment has been minimized.
Apache9
commented
Apr 11, 2023
I used to consider the same but soon I found that there are some tricks in our implementation, as we may generate some fake cell for seeking. I saw that you have already handled the case where left family length or right family length are zero, this is for some key only cell, but I'm afraid there could still be other type of fake cells, for example, when querying on a bloom filter enabled region, we may use bloom filter to generate a fake cell, if the type of the bloom filter is ROWCOL, maybe we could also include a fake family? |
bsglz
commented
Apr 11, 2023
Yeah, this is a fairly important class and does require detailed testing. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Apache9 Checked the code, the bloom filter use empty family both in storing and checking, so seems ok. BTW, the method of checkGeneralBloomFilter use CellComparator.getInstance() directly which return CellComparatorImpl, will change them later. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
| if (comparator == MetaCellComparator.META_COMPARATOR) { | ||
| this.comparator = comparator; | ||
| } else { | ||
| this.comparator = InnerStoreCellComparator.INNER_STORE_COMPARATOR; |
There was a problem hiding this comment.
This is a bit strange, as we may not use the comparator passed in. We should use a new pattern to set the comparator here, otherwise it will confuse developers...
There was a problem hiding this comment.
Make sense, will refactor here.
Thanks.
This comment has been minimized.
This comment has been minimized.
bsglz
commented
Apr 12, 2023
Writing a perf test class for cellComparator, don't merge yet even if the tests pass. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bsglz
commented
Apr 12, 2023
Added perf test class named PerfTestCellComparator.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
More detailed test report, compareCnt is 1 billion. <style type='text/css'></style>
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bsglz
commented
Apr 28, 2023
Any other comments? @Apache9@bbeaudreault |
| public static CellComparator getInnerStoreCellComparator(Configuration conf, byte[] tableName) { | ||
| if ( | ||
| conf != null && conf.getBoolean(HConstants.USE_META_CELL_COMPARATOR, |
There was a problem hiding this comment.
Can we move this judgement in upper layer so we do not need to move USE_META_CELL_COMPARATOR to HConstants? It is just for internal use, we'd better not put it into an IA.Public class...
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| */ | ||
| @Category({ MediumTests.class }) | ||
| @RunWith(Parameterized.class) | ||
| public class PerfTestCellComparator { |
There was a problem hiding this comment.
I think we'd better just post the JMH code on the jira issue? Without JMH, a micro bench is not very stable...
| */ | ||
| // We could write the actual class name from 2.0 onwards and handle BC | ||
| private String comparatorClassName = CellComparator.getInstance().getClass().getName(); | ||
| private String comparatorClassName = |
There was a problem hiding this comment.
No compatibility issues?
Thought about it and i think so, because we do the conversion when we save and read the hfile, the actual store is the KVComparator, we can't change this since we want hbase1.x to be able to read the files generated in the new version. See the comment of getHBase1CompatibleName for more detail.
Thanks.
Apache-HBase
commented
May 2, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
May 2, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
May 2, 2023
🎊 +1 overall
This message was automatically generated. |
bsglz
commented
May 5, 2023
Any more comments? @Apache9@bbeaudreault |
No description provided.