Skip to content

Conversation

@kevinrr888
Copy link
Member

ThriftPropertyException was declared as thrown by
FateServiceHandler.executeFateOperation but not by manager.thrift.executeFateOperation, resulting in the client receiving an exception without info about the cause.

I noticed this working on #6040, where I need to throw a ThriftPropertyException and noticed I was not receiving the expected error to the client

ThriftPropertyException was declared as thrown by
FateServiceHandler.executeFateOperation but not by
manager.thrift.executeFateOperation, resulting in the client receiving
an exception without info about the cause.
@kevinrr888 kevinrr888 added this to the 2.1.5 milestone Jan 9, 2026
@kevinrr888 kevinrr888 self-assigned this Jan 9, 2026
@kevinrr888
Copy link
Member Author

Here is a test that demonstrates the problem:

  @Test
  public void TEMP() throws Exception {
    String[] names = getUniqueNames(2);
    String src = names[0];
    String dst = names[1];
    client.tableOperations().create(src);
    client.tableOperations().clone(src, dst, CloneConfiguration.builder().setPropertiesToSet(Map.of("random.invalid.key", "123")).build());
  }

Before:

org.apache.accumulo.core.client.AccumuloException: Internal error processing executeFateOperation

	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:412)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:364)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doTableFateOperation(TableOperationsImpl.java:1803)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.clone(TableOperationsImpl.java:801)
	at org.apache.accumulo.test.IteratorEnvIT.TEMP(IteratorEnvIT.java:232)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.apache.thrift.TApplicationException: Internal error processing executeFateOperation
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:81)
	at org.apache.accumulo.core.manager.thrift.FateService$Client.recv_executeFateOperation(FateService.java:134)
	at org.apache.accumulo.core.manager.thrift.FateService$Client.executeFateOperation(FateService.java:115)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.executeFateOperation(TableOperationsImpl.java:289)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:375)
	... 9 more

After:

org.apache.accumulo.core.client.AccumuloException
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:412)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:364)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doTableFateOperation(TableOperationsImpl.java:1803)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.clone(TableOperationsImpl.java:801)
	at org.apache.accumulo.test.IteratorEnvIT.TEMP(IteratorEnvIT.java:232)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: ThriftPropertyException(property:random.invalid.key, value:123, description:Invalid Table Property random.invalid.key=123)
	at org.apache.accumulo.core.manager.thrift.FateService$executeFateOperation_result$executeFateOperation_resultStandardScheme.read(FateService.java:3876)
	at org.apache.accumulo.core.manager.thrift.FateService$executeFateOperation_result$executeFateOperation_resultStandardScheme.read(FateService.java:3834)
	at org.apache.accumulo.core.manager.thrift.FateService$executeFateOperation_result.read(FateService.java:3759)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:93)
	at org.apache.accumulo.core.manager.thrift.FateService$Client.recv_executeFateOperation(FateService.java:134)
	at org.apache.accumulo.core.manager.thrift.FateService$Client.executeFateOperation(FateService.java:115)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.executeFateOperation(TableOperationsImpl.java:289)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:375)
	... 9 more

Copy link
Contributor

@keith-turner keith-turner left a comment

Choose a reason for hiding this comment

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

Here is a test that demonstrates the problem:

Would it be possible to make that snippet of example code into an IT that ensures we get a nice error message back?

Wondering if there are any other places in the code where server side config validation failure does not result in a useful client side error message.

Copy link
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

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

I don't think this is the right approach for this. I think the method should not be throwing the ThriftPropertyException type, but some version of ThriftTableOperationException type to indicate an overall failure with the specific fate operation. It may have a "caused by" or something that indicates it was caused by a property issue, though.

I created #6061 to address this RPC exception type mismatch more generally.

being thrown by executeFateOperation, replaced with
ThriftTableOperationException
@kevinrr888
Copy link
Member Author

kevinrr888 commented Jan 15, 2026

@ctubbsii I pushed 6e72b84. Here is the new exception the client receives. Used test from here

org.apache.accumulo.core.client.AccumuloException: Invalid Table Property random.invalid.key=123

	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:409)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:364)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doTableFateOperation(TableOperationsImpl.java:1803)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.clone(TableOperationsImpl.java:801)
	at org.apache.accumulo.test.CloseScannerIT.TEMP(CloseScannerIT.java:133)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: ThriftTableOperationException(tableId:null, tableName:CloseScannerIT_TEMP1, op:CLONE, type:OTHER, description:Invalid Table Property random.invalid.key=123)
	at org.apache.accumulo.core.manager.thrift.FateService$executeFateOperation_result$executeFateOperation_resultStandardScheme.read(FateService.java:3767)
	at org.apache.accumulo.core.manager.thrift.FateService$executeFateOperation_result$executeFateOperation_resultStandardScheme.read(FateService.java:3743)
	at org.apache.accumulo.core.manager.thrift.FateService$executeFateOperation_result.read(FateService.java:3676)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:93)
	at org.apache.accumulo.core.manager.thrift.FateService$Client.recv_executeFateOperation(FateService.java:134)
	at org.apache.accumulo.core.manager.thrift.FateService$Client.executeFateOperation(FateService.java:115)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.executeFateOperation(TableOperationsImpl.java:289)
	at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:375)
	... 9 more

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.

3 participants