dlmarion commented on code in PR #6173:
URL: https://github.com/apache/accumulo/pull/6173#discussion_r2885500310


##########
test/src/main/java/org/apache/accumulo/test/NamespacesIT.java:
##########
@@ -411,8 +411,12 @@ public void verifyIteratorInheritance() throws Exception {
           EnumSet.allOf(IteratorScope.class));
       c.namespaceOperations().attachIterator(namespace, setting);
       sleepUninterruptibly(2, TimeUnit.SECONDS);
-      var e = assertThrows(AccumuloException.class, () -> 
c.namespaceOperations()
-          .checkIteratorConflicts(namespace, setting, 
EnumSet.allOf(IteratorScope.class)));
+      // conflicting iterator with same name and different priority
+      IteratorSetting conflictingSetting = new 
IteratorSetting(setting.getPriority() + 1,
+          setting.getName(), setting.getIteratorClass());
+      var e = assertThrows(AccumuloException.class,
+          () -> c.namespaceOperations().checkIteratorConflicts(namespace, 
conflictingSetting,
+              EnumSet.allOf(IteratorScope.class)));

Review Comment:
   This changes seems unrelated to #6045. 



##########
core/src/main/java/org/apache/accumulo/core/clientImpl/Namespaces.java:
##########
@@ -124,16 +124,14 @@ public static NamespaceId getNamespaceId(ClientContext 
context, String namespace
   }
 
   /**
-   * Look for namespace ID in ZK. Fail quietly by logging and returning null.
+   * Look for namespace ID in ZK. Fail quietly by returning null.
    */
   public static NamespaceId lookupNamespaceId(ClientContext context, String 
namespaceName) {
     NamespaceId id = null;
     try {
       id = getNamespaceId(context, namespaceName);
     } catch (NamespaceNotFoundException e) {
-      if (log.isDebugEnabled()) {
-        log.debug("Failed to find namespace ID from name: " + namespaceName, 
e);
-      }
+      // not found is the expected outcome - callers handle null return
     }
     return id;

Review Comment:
   Could potentially simplify to:
   ```
   try {
     return getNamespaceId(context, namespaceName);
   } catch NamespaceNotFoundExceptione) {
     return null;
   }
   ```



-- 
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]

Reply via email to