Skip to content

feature: MCT-342: Add cancellation token to matching algorithm instan…#1429

Open
pchenery wants to merge 4 commits intomasterfrom
feature-mct-342-add-automatic-deadlettering-when-matching-algorithm-instance-shuts-down
Open

feature: MCT-342: Add cancellation token to matching algorithm instan…#1429
pchenery wants to merge 4 commits intomasterfrom
feature-mct-342-add-automatic-deadlettering-when-matching-algorithm-instance-shuts-down

Conversation

@pchenery
Copy link
Copy Markdown
Contributor

@pchenery pchenery commented Dec 16, 2025

…ce on shut down


This change is Reviewable

@pchenery pchenery requested a review from a team as a code owner December 16, 2025 18:21
Copy link
Copy Markdown
Contributor

@daria-sorokina-da daria-sorokina-da left a comment

Choose a reason for hiding this comment

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

@daria-sorokina-da reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @pchenery)


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 92 at r1 (raw file):

            try
            {
                log.LogInformation("Function executing");

Function FunctionTestCancellationToken executing


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 97 at r1 (raw file):

                await Task.Delay(TimeSpan.FromHours(1), cancellationToken);

                log.LogInformation("Function executed");

Function FunctionTestCancellationToken executed


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 101 at r1 (raw file):

            catch (OperationCanceledException)
            {
                log.LogWarning("Function cancelled");

Function FunctionTestCancellationToken cancelled


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 109 at r1 (raw file):

            [ServiceBusTrigger(
                 "%MessagingServiceBus:SearchRequestsTopic%",
                 "test-cancellation-token",

please call this "test-no-cancellation-token"


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 116 at r1 (raw file):

            try
            {
                log.LogInformation("Function executing");

Function FunctionTestNoCancellationToken executing


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 121 at r1 (raw file):

                await Task.Delay(TimeSpan.FromHours(1));

                log.LogInformation("Function executed");

Function FunctionTestNoCancellationToken executed


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 125 at r1 (raw file):

            catch (OperationCanceledException)
            {
                log.LogWarning("Function cancelled");

Function FunctionTestNoCancellationToken cancelled

Copy link
Copy Markdown
Contributor Author

@pchenery pchenery left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @daria-sorokina-da)


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 92 at r1 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Function FunctionTestCancellationToken executing

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 97 at r1 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Function FunctionTestCancellationToken executed

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 101 at r1 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Function FunctionTestCancellationToken cancelled

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 109 at r1 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

please call this "test-no-cancellation-token"

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 116 at r1 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Function FunctionTestNoCancellationToken executing

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 121 at r1 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Function FunctionTestNoCancellationToken executed

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 125 at r1 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Function FunctionTestNoCancellationToken cancelled

Done.

Copy link
Copy Markdown
Contributor

@daria-sorokina-da daria-sorokina-da left a comment

Choose a reason for hiding this comment

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

@daria-sorokina-da reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pchenery)


a discussion (no related file):
No need to merge, will be used for testing

Copy link
Copy Markdown
Contributor

@daria-sorokina-da daria-sorokina-da left a comment

Choose a reason for hiding this comment

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

@daria-sorokina-da reviewed 1 file and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pchenery).

Copy link
Copy Markdown
Contributor

@daria-sorokina-da daria-sorokina-da left a comment

Choose a reason for hiding this comment

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

@daria-sorokina-da made 3 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @pchenery).


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 85 at r3 (raw file):

        [Function(nameof(FunctionTestCancellationToken))]
        public async Task FunctionTestCancellationToken(

Add a new function FunctionTestCancellationTokenWithWaitAsync with another subscription test-cancellation-token-with-wait-async

await Task.Delay().WaitAsync(cancellationToken);


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 104 at r3 (raw file):

            catch (OperationCanceledException)
            {
                logger.LogWarning("Function FunctionTestCancellationToken cancelled");

Please add

throw;

Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 127 at r3 (raw file):

            catch (OperationCanceledException)
            {
                logger.LogWarning("Function FunctionTestNoCancellationToken cancelled");

Please add

throw;

Copy link
Copy Markdown
Contributor Author

@pchenery pchenery left a comment

Choose a reason for hiding this comment

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

@pchenery made 3 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @daria-sorokina-da).


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 85 at r3 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Add a new function FunctionTestCancellationTokenWithWaitAsync with another subscription test-cancellation-token-with-wait-async

await Task.Delay().WaitAsync(cancellationToken);

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 104 at r3 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Please add

throw;

Done.


Atlas.MatchingAlgorithm.Functions/Functions/SearchFunctions.cs line 127 at r3 (raw file):

Previously, daria-sorokina-da (Daria Sorokina) wrote…

Please add

throw;

Done.

Copy link
Copy Markdown
Contributor

@daria-sorokina-da daria-sorokina-da left a comment

Choose a reason for hiding this comment

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

@daria-sorokina-da reviewed 1 file and all commit messages, and resolved 3 discussions.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pchenery).

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