Skip to content

Conversation

@dlmarion
Copy link
Contributor

The Coordinator in 2.1 checks the exception class name and if it is not null, then treats it as a failure. In 2.1 when a compaction is cancelled, null is passed.

In main null was removed from the Compactor and InterruptedException was used in it's place. However the Coordinator code was not updated and was still treating it as a failure because the exception class name is not null. Fixed this check such that it's only treated as a failure if the class name is not the InterruptedException class name.

Closes #6018

The Coordinator in 2.1 checks the exception class name and if
it is not null, then treats it as a failure. In 2.1 when a
compaction is cancelled, null is passed.

In main null was removed from the Compactor and InterruptedException
was used in it's place. However the Coordinator code was not updated
and was still treating it as a failure because the exception class
name is not null. Fixed this check such that it's only treated as
a failure if the class name is not the InterruptedException class
name.

Closes apache#6018
@dlmarion dlmarion added this to the 4.0.0 milestone Dec 15, 2025
@dlmarion dlmarion self-assigned this Dec 15, 2025
@keith-turner
Copy link
Contributor

The way the compactor communicates cancellation is hidden and its brittle, makes it easier for someone to accidentally break these comms on the client or server side w/o realizing it. We could make communicating this more visible with a new RPC specifically for compaction cancelled. Or we could add a thrift enum to the existing failure RPC to specify the reason for the failure like ERROR or CANCELLATION.

@dlmarion
Copy link
Contributor Author

The way the compactor communicates cancellation is hidden and its brittle, makes it easier for someone to accidentally break these comms on the client or server side w/o realizing it. We could make communicating this more visible with a new RPC specifically for compaction cancelled. Or we could add a thrift enum to the existing failure RPC to specify the reason for the failure like ERROR or CANCELLATION.

Good idea, I'll look at adding a Thrift enum.

@dlmarion dlmarion merged commit d016773 into apache:main Dec 16, 2025
8 checks passed
@dlmarion dlmarion deleted the 6018-compaction-cancelled branch December 16, 2025 16:43
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.

Evaluate Compactor / Coordinator message on failure

2 participants