Skip to content

Remove wrapping TableNotFoundException in AccumuloException - #6551

Open
Amemeda wants to merge 4 commits into
apache:mainfrom
Amemeda:5602-table-operations
Open

Amemeda wants to merge 4 commits into
apache:mainfrom
Amemeda:5602-table-operations

Conversation

@Amemeda

@Amemeda Amemeda commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Remove wrapping TableNotFoundException in AccumuloException in a few TableOperations.java methods. This way the methods can throw TableNotFoundException directly.

closes #5602

Comment thread core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java Outdated
Comment thread core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java Outdated
retry.logCompletion(log, "Modifying properties for table " + tableName);
return props;
} catch (ConcurrentModificationException cme) {
} catch (ConcurrentModificationException | TableNotFoundException cme) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This catch block triggers a retry, but that doesn't make sense for the case where the table doesn't exist. It only makes sense for concurrent modifications.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added this catch because of the call to tryToModifyProperties above, in that method I had to to add the TableNotFoundException as the method was throwing TableNotFoundException wrapped in AccumuloException. So now I think this method has to accommodate for that

Comment thread core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java Outdated
@ctubbsii ctubbsii added this to the 4.0.0 milestone Sep 25, 2026
Comment on lines +1028 to +1039
@@ -1039,13 +1036,14 @@ public void setProperty(final String tableName, final String property, final Str
setPropertyNoChecks(tableName, property, value);
checkLocalityGroups(tableName, property);
} catch (TableNotFoundException | IllegalArgumentException e) {
throw new AccumuloException(e);
throw new TableNotFoundException((ThriftTableOperationException) e);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Build is failing on line 1039 with impossible cast from TableNotFoundException to ThriftTableOperationException. Strangely, I get an error when I try to just throw new TableNotFoundException(e) saying its expecting the Thrift exception, but when it is a Thrift exception, the impossible cast error occurs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed try catch block in f430619

@Amemeda

Amemeda commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Everything working locally, Kicked off IT build to see if anything breaks

This branch has not been deployed

No deployments
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.

Stop wrapping TableNotFoundException in TableOperations

2 participants