Skip to content

Change the cancellation detection strategy#203

Merged
boma96 merged 3 commits intomasterfrom
fix/master/cancellation-detection
Apr 2, 2025
Merged

Change the cancellation detection strategy#203
boma96 merged 3 commits intomasterfrom
fix/master/cancellation-detection

Conversation

@boma96
Copy link
Copy Markdown
Collaborator

@boma96 boma96 commented Apr 2, 2025

Cancellation detection was primitive(i.e. cancellation was logged only if TaskCancelledException was thrown). This had several issues.

  • Some libraries throw OperationCancelledException if the task is cancelled (hence why we now use OperationCancelledException instead of TaskCancelledException). Also OperationCancelledException is base of TaskCancelledException which means we can handle the later.
  • We also want to make sure that cancellation request comes from Kafka topic(instead of someone just throwing OperationCancelledException) hence why we introduce additional condition.

@boma96 boma96 merged commit 54365e3 into master Apr 2, 2025
1 check passed
@boma96 boma96 deleted the fix/master/cancellation-detection branch April 2, 2025 09:55
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.

1 participant