liuxiaocs7 commented on code in PR #8387:
URL: https://github.com/apache/hbase/pull/8387#discussion_r3461404552
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/CloneSnapshotFromClientAfterSplittingRegionTestBase.java:
##########
@@ -41,10 +41,20 @@ protected
CloneSnapshotFromClientAfterSplittingRegionTestBase(int numReplicas) {
private void splitRegion() throws IOException {
int numRegions = admin.getRegions(tableName).size();
+ // Major-compact every region into a single store file that spans the
whole key range of the
+ // region. This guarantees that the split row falls inside an existing
store file, so the split
+ // produces a reference file rather than a whole-file link (see
HBASE-26421, which builds an
+ // HFileLink instead of a Reference when a store file lies entirely on one
side of the split
+ // point). Without this, the randomly generated row keys may all fall on
one side of the split
+ // point, leaving the snapshot with no reference files. The cloned table's
meta would then be
+ // missing the parent split information, which is what HBASE-29111 guards
against below. The
+ // region server has compaction disabled (see
CloneSnapshotFromClientTestBase), so we
+ // major-compact the table's regions directly to bypass that;
auto-compaction stays disabled
+ // afterward so the post-split reference files are not compacted away.
+ TEST_UTIL.compact(tableName, true);
Review Comment:
We need to compact store files here
--
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]