Audit and fix thrift RPC problems#6423
Open
ctubbsii wants to merge 2 commits into
Open
Conversation
* Use Client instead of Iface where it makes sense * Remove improperly thrown exceptions from RPC implementation methods (TException when specified directly, and any others that are not declared in the IDL for that method) * Add some essential exceptions to Thrift IDL where they were previously missed (and assumed to work) * Create an integration test that inspects our thrift service implementations and verifies we haven't introduced additional mistakes * Update JUnit and EasyMock to work better with Eclipse IDE on newer Java versions * Add some missing descriptions to some ThriftTableOperationException instances * Remove improper constructions of TApplicationException (should only be constructed internally inside libthrift, never by us, as it is an exception that signals to a client that a server-side exception occurred, most often by a runtime exception being thrown on the server side) * Construct ThriftSecurityOperation directly in RPC handler code, instead of constructing as AccumuloSecurityException and then calling .asThriftException(); that method is provided to make it easy to serialize public API exceptions for RPC requests, and is not needed in RPC code itself * Remove some attempts to convert RuntimeExceptions to TException in RPC handling code This fixes apache#6061
Member
Author
ddanielr
approved these changes
Jun 11, 2026
ddanielr
left a comment
Contributor
There was a problem hiding this comment.
@ddanielr This addresses some gaps left by #3177 with the addition of the ThriftPropertyException in the method signatures of the handler code, but I'm not sure if it fully addresses all the intentions you had with that PR.
Changes look fine. The behavior added in #3177 still works.
The client still receives an error about why the modify properties operation failed on instance operations.
org.apache.accumulo.core.client.AccumuloException: ThriftPropertyException(property:Modify properties, value:failed, description:Property tserver.scan.files.open.max with value: foo is not valid)
And table operations error the same way and still return the table ID.
org.apache.accumulo.core.client.AccumuloException: ThriftPropertyException(property:Modify properties, value:failed, description:Invalid property for : TablePropKey{TableId=1} name: table.bulk.max.tablets, value: thousand)
Member
Author
|
This is going to take a bit of time to merge to main. I'll hold off merging to 2.1 for a couple hours while I ensure that I can merge it cleanly into main soon after. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #6061