This is an automated email from the ASF dual-hosted git repository.
krathbun 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 2f37ef5db4 reverts breaking change that added new metadata constraint:
(#5519)
2f37ef5db4 is described below
commit 2f37ef5db46065394bb1466f85cf068bcde19cfe
Author: Kevin Rathbun <[email protected]>
AuthorDate: Wed Apr 30 10:23:57 2025 -0400
reverts breaking change that added new metadata constraint: (#5519)
reverts a breaking change which prevented setting tablet availability on
system tables with a metadata constraint. This broke splits which needs
to set the availability of new tablets.
associated commit: 2cd2a90a739d26c3f8dbf1bcc787aec8a1ac143d
---
.../accumulo/server/constraints/MetadataConstraints.java | 8 --------
.../accumulo/server/constraints/MetadataConstraintsTest.java | 11 -----------
2 files changed, 19 deletions(-)
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
b/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
index 2c18a5c514..c766916852 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
@@ -301,8 +301,6 @@ public class MetadataConstraints implements Constraint {
return "Malformed availability value";
case 4006:
return "Malformed mergeability value";
- case 4007:
- return "Tried to set availability of a system table";
}
return null;
@@ -378,12 +376,6 @@ public class MetadataConstraints implements Constraint {
case (TabletColumnFamily.AVAILABILITY_QUAL):
try {
TabletAvailabilityUtil.fromValue(new Value(columnUpdate.getValue()));
- if (!violations.contains((short) 4)) {
- KeyExtent ke = KeyExtent.fromMetaRow(new Text(mutation.getRow()));
- if (ke.isSystemTable()) {
- addViolation(violations, 4007);
- }
- }
} catch (IllegalArgumentException e) {
addViolation(violations, 4005);
}
diff --git
a/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
b/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
index 1f27dbc979..2ed44cbf4b 100644
---
a/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
+++
b/server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
@@ -696,21 +696,10 @@ public class MetadataConstraintsTest {
Mutation m;
List<Short> violations;
- for (var sysTable : SystemTables.values()) {
- KeyExtent ke = new KeyExtent(sysTable.tableId(), null, null);
- m = new Mutation(ke.toMetaRow());
- TabletColumnFamily.AVAILABILITY_COLUMN.put(m, new
Value(TabletAvailability.UNHOSTED.name()));
- assertViolation(mc, m, (short) 4007);
- }
-
m = new Mutation(new Text("0;foo"));
TabletColumnFamily.AVAILABILITY_COLUMN.put(m, new Value("INVALID"));
assertViolation(mc, m, (short) 4005);
- m = new Mutation(new Text("foo"));
- TabletColumnFamily.AVAILABILITY_COLUMN.put(m, new
Value(TabletAvailability.UNHOSTED.name()));
- assertViolation(mc, m, (short) 4);
-
m = new Mutation(new Text("0;foo"));
TabletColumnFamily.AVAILABILITY_COLUMN.put(m, new
Value(TabletAvailability.UNHOSTED.name()));
violations = mc.check(createEnv(), m);