Skip to content

Continue cancellation token propagation in audit persistence layer - #5736

Merged
johnsimons merged 1 commit into
masterfrom
john/cancel_part6
Aug 12, 2026
Merged

johnsimons merged 1 commit into
masterfrom
john/cancel_part6

Conversation

@johnsimons

Copy link
Copy Markdown
Member

This change expands the consistent application of optional CancellationToken parameters to asynchronous methods within the audit persistence interfaces and their InMemory and RavenDB implementations.

Cancellation tokens are now propagated to underlying asynchronous database calls and consuming services. This ensures proper cancellation of long-running operations and further reduces cancellation analyzer debt by removing suppressions from related .editorconfig files.

@johnsimons
johnsimons requested a review from rbev August 11, 2026 06:50
@johnsimons johnsimons self-assigned this Aug 11, 2026
@johnsimons
johnsimons marked this pull request as ready for review August 11, 2026 07:17
Base automatically changed from john/cancel_part5 to master August 11, 2026 11:55
This change expands the consistent application of optional `CancellationToken` parameters to asynchronous methods within the audit persistence interfaces and their InMemory and RavenDB implementations.

Cancellation tokens are now propagated to underlying asynchronous database calls and consuming services. This ensures proper cancellation of long-running operations and further reduces cancellation analyzer debt by removing suppressions from related `.editorconfig` files.
# WaitForLicenseOrThrow passes only the linked cts.Token into its try, so PS0020 cannot recognise a
# filter on the caller's token. Removing this needs the license-check exception mapping reworked, not
# a token added, so it is deliberately scoped to the one file rather than the project.
[LicenseStatusCheck.cs]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't the problematic file just get a #pragma instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think Claude is doing it this way.
When we're done, hopefully there is nothing left in the .editorconfig files.


# Justification: the polling loop swallows OperationCanceledException on purpose, because querying an
# index at the moment it updates throws one. That is not cancellation, so there is no token to filter on.
[IndexSetupTests.cs]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't the problematic file just get a #pragma instead?

@johnsimons
johnsimons merged commit 7b76ce5 into master Aug 12, 2026
50 checks passed
@johnsimons
johnsimons deleted the john/cancel_part6 branch August 12, 2026 02:53
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.

2 participants