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 44c3e553d3 Add default namespace table mapping node during upgrade 
(#5800)
44c3e553d3 is described below

commit 44c3e553d35c82eb9c634808a9e9b3c177975bc6
Author: Dave Marion <[email protected]>
AuthorDate: Fri Aug 15 08:44:25 2025 -0400

    Add default namespace table mapping node during upgrade (#5800)
    
    Closes #5797
---
 .../main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java  | 3 +++
 .../java/org/apache/accumulo/manager/upgrade/Upgrader12to13Test.java   | 2 ++
 2 files changed, 5 insertions(+)

diff --git 
a/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java
 
b/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java
index ea308ce0bc..8bdd200f3e 100644
--- 
a/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java
+++ 
b/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java
@@ -421,6 +421,9 @@ public class Upgrader12to13 implements Upgrader {
               return tableName;
             });
       }
+      // Ensure the default namespace table mapping node gets created
+      // in case there are not tables in the default namespace
+      mapOfTableMaps.putIfAbsent(Namespace.DEFAULT.id().canonical(), new 
HashMap<>());
       for (Map.Entry<String,Map<String,String>> entry : 
mapOfTableMaps.entrySet()) {
         zrw.putPersistentData(Constants.ZNAMESPACES + "/" + entry.getKey() + 
Constants.ZTABLES,
             NamespaceMapping.serializeMap(entry.getValue()), 
ZooUtil.NodeExistsPolicy.FAIL);
diff --git 
a/server/manager/src/test/java/org/apache/accumulo/manager/upgrade/Upgrader12to13Test.java
 
b/server/manager/src/test/java/org/apache/accumulo/manager/upgrade/Upgrader12to13Test.java
index 671aef7c3b..235eaa202d 100644
--- 
a/server/manager/src/test/java/org/apache/accumulo/manager/upgrade/Upgrader12to13Test.java
+++ 
b/server/manager/src/test/java/org/apache/accumulo/manager/upgrade/Upgrader12to13Test.java
@@ -38,6 +38,7 @@ import java.util.UUID;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
+import org.apache.accumulo.core.clientImpl.Namespace;
 import org.apache.accumulo.core.clientImpl.NamespaceMapping;
 import org.apache.accumulo.core.data.InstanceId;
 import org.apache.accumulo.core.fate.zookeeper.ZooReader;
@@ -117,6 +118,7 @@ public class Upgrader12to13Test {
           .put(tableId, entry.getValue());
     }
 
+    expectedNamespaceMaps.put(Namespace.DEFAULT.id().canonical(), new 
HashMap<>());
     for (Map.Entry<String,Map<String,String>> entry : 
expectedNamespaceMaps.entrySet()) {
       expect(zrw.putPersistentData(
           eq(Constants.ZNAMESPACES + "/" + entry.getKey() + Constants.ZTABLES),

Reply via email to