HIVE-28240: Compaction requests remain in Working state after Timeout… #5230
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.
…Exception
What changes were proposed in this pull request?
When a compaction worker receive TimeoutException during execution of a compaction request, it attempts to cancel a running compaction by calling cancel on a compaction's Future object and by killing and recreating a compaction executor. However, we got a case on a downstream code where calling the cancel method on the compaction's future object didn't stop the compaction requests and they remained in the Working status. These changes propose marking compaction request as Failed to ensure that it doesn't stay in Working status.
Why are the changes needed?
To ensure that a compaction request doesn't stay in Working status after TimeoutException.
Does this PR introduce any user-facing change?
No
Is the change a dependency upgrade?
How was this patch tested?
Pre-commit tests.