This is an automated email from the ASF dual-hosted git repository.
dlmarion 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 4999191f7a Modified TableMapping.update to only check root and meta
exist (#5641)
4999191f7a is described below
commit 4999191f7afda465a3a32c5c32c9f005a16193ce
Author: Dave Marion <[email protected]>
AuthorDate: Fri Jun 13 12:49:24 2025 -0400
Modified TableMapping.update to only check root and meta exist (#5641)
TableMapping.update was added as part of #5451 and it validated
that the accumulo namespace contained all of the system tables.
This is technically correct, except when upgrading. Since this
is used as part of the client, there is not a good way to
determine whether or not the instance is upgrading to implement
an alternate check. This change modifies the check in
TableMapping.update to only check that root and meta tables
exist to allow the upgrade code to run.
Closes #5640
---
.../java/org/apache/accumulo/core/util/tables/TableMapping.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/core/src/main/java/org/apache/accumulo/core/util/tables/TableMapping.java
b/core/src/main/java/org/apache/accumulo/core/util/tables/TableMapping.java
index 4d8d6a22e8..c38a269bf7 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/tables/TableMapping.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/tables/TableMapping.java
@@ -144,9 +144,11 @@ public class TableMapping {
}
Map<String,String> idToName = deserializeMap(data);
if (namespaceId.equals(Namespace.ACCUMULO.id())) {
- if (!idToName.equals(SystemTables.tableIdToSimpleNameMap())) {
- throw new IllegalStateException("Accumulo namespace expected to
contain tables "
- + SystemTables.tableIdToSimpleNameMap() + ", but saw " +
idToName);
+ if (!(idToName.containsKey(SystemTables.ROOT.tableId().canonical())
+ &&
idToName.containsKey(SystemTables.METADATA.tableId().canonical()))) {
+ throw new IllegalStateException("Accumulo namespace expected to at
least contain tables "
+ + SystemTables.ROOT.tableId().canonical() + " and "
+ + SystemTables.METADATA.tableId().canonical() + ", but saw " +
idToName);
}
}
var converted = ImmutableSortedMap.<TableId,String>naturalOrder();