Skip to content

removed Log and fixed IT#6173

Open
ArbaazKhan1 wants to merge 4 commits intoapache:2.1from
ArbaazKhan1:accumulo-6045
Open

removed Log and fixed IT#6173
ArbaazKhan1 wants to merge 4 commits intoapache:2.1from
ArbaazKhan1:accumulo-6045

Conversation

@ArbaazKhan1
Copy link
Contributor

Closes issue #6045

I removed the log from lookupNamespaceId, the DEBUG log was misleading since its a "fail quietly" wrapper around getNamespaceId and was intended to "fail" there. It looks like its called during namespace creation specifically to check that the namespace does not yet exist and should fail quietly and the null return is handled by the methods that call it.

Additionally I fixed the error thrown in namspacesIT. The test was expecting for an error thrown but was being passed the same iterator. IteratorConfigUtil intentionally skips conflict detection when the iterator being checked is the same as an existing one, reattaching the same iterator is not an error.

Comment on lines 130 to 136
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could potentially simplify to:

try {
  return getNamespaceId(context, namespaceName);
} catch NamespaceNotFoundExceptione) {
  return null;
}

Comment on lines +414 to +419
// 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)));
Copy link
Contributor

@dlmarion dlmarion Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes seems unrelated to #6045.

Edit: Nevermind this comment, I see now you are trying to fix an IT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is but when running the IT was throwing an error for this test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants