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


##########
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());

Review Comment:
   How does adding a new iterator setting with a different priority fix the 
check that looks for iterators with the same priority?



##########
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());

Review Comment:
   I think the issue is a race condition. The call to attachIterator on line 
412 connects to the Manager to call modifyProperties on the Namespace. Down in 
the call to checkIteratorConflict there is a call to getNamespaceProperties 
which connects to any of the server processes to get the processes. I would 
suggest creating a new issue for this and removing the changes from this PR.



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