This is an automated email from the ASF dual-hosted git repository.
cshannon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new ae9b6a783f Fix MetadataIT tablet mergeability check (#5413)
ae9b6a783f is described below
commit ae9b6a783fcfc3581f9253180961af429dbc7904
Author: Christopher L. Shannon <[email protected]>
AuthorDate: Tue Mar 18 12:12:06 2025 -0400
Fix MetadataIT tablet mergeability check (#5413)
PR #5353 changed the default TabletMergeability setting for initial
system tablets to be always for scanref, fate, and the default metadata
tablet. The root tablet and tablets section metadata tablet are still
set to "never" and the test needed to be updated to account for this.
---
.../apache/accumulo/test/functional/MetadataIT.java | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git
a/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
b/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
index 730c114838..fbb621fd82 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
@@ -59,6 +59,7 @@ import
org.apache.accumulo.core.metadata.schema.TabletMetadata;
import org.apache.accumulo.core.metadata.schema.TabletsMetadata;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.TablePermission;
+import org.apache.accumulo.core.util.time.SteadyTime;
import org.apache.accumulo.harness.SharedMiniClusterBase;
import org.apache.hadoop.io.Text;
import org.junit.jupiter.api.AfterAll;
@@ -291,12 +292,23 @@ public class MetadataIT extends SharedMiniClusterBase {
assertEquals(maxVersions,
tableProps.get(Property.TABLE_ITERATOR_PREFIX.getKey() +
"majc.vers.opt.maxVersions"));
- // Verify all tablets are HOSTED and Mergeablity is NEVER
+ // Verify all tablets are HOSTED and initial TabletMergeability settings
+ var metaSplit =
MetadataSchema.TabletsSection.getRange().getEndKey().getRow();
+ var initAlwaysMergeable =
+
TabletMergeabilityMetadata.always(SteadyTime.from(Duration.ofMillis(0)));
try (var tablets =
client.getAmple().readTablets().forTable(tableId).build()) {
assertTrue(
tablets.stream().allMatch(tm -> tm.getTabletAvailability() ==
TabletAvailability.HOSTED));
- assertTrue(tablets.stream()
- .allMatch(tm ->
tm.getTabletMergeability().equals(TabletMergeabilityMetadata.never())));
+ assertTrue(tablets.stream().allMatch(tm -> {
+ // ROOT table and Metadata TabletsSection tablet should be set to
never mergeable
+ // All other initial tablets for Metadata, Fate, Scanref should be
always
+ if (AccumuloTable.ROOT.tableId().equals(tableId)
+ || (AccumuloTable.METADATA.tableId().equals(tableId)
+ && metaSplit.equals(tm.getEndRow()))) {
+ return
tm.getTabletMergeability().equals(TabletMergeabilityMetadata.never());
+ }
+ return tm.getTabletMergeability().equals(initAlwaysMergeable);
+ }));
}
}
}