Skip to content

IGNITE-21033 .NET: Fix retry handling with notifications in Compute#2981

Merged
ptupitsyn merged 12 commits intoapache:mainfrom
ptupitsyn:ignite-21033
Dec 22, 2023
Merged

IGNITE-21033 .NET: Fix retry handling with notifications in Compute#2981
ptupitsyn merged 12 commits intoapache:mainfrom
ptupitsyn:ignite-21033

Conversation

@ptupitsyn
Copy link
Contributor

@ptupitsyn ptupitsyn commented Dec 21, 2023

Address the following scenario:

  • Initial COMPUTE_EXECUTE request has been sent, but the connection has failed before we got a response
  • ClientSocket.Dispose invokes all notification handlers with IgniteClientConnectionException
  • RetryPolicy kicks in, reconnects the channel and sends another COMPUTE_EXECUTE request, which leads to a successful task execution
  • Notification handler is invoked with a computation result, BUT, TaskCompletionSource is already completed exceptionally due to the first failure

To fix that, TaskCompletionSource (NotificationHandler) is now returned with the resulting PooledBuffer from DoOutInOpAsync. This way we ignore notification handlers from failed attempts, and only use the last one.

Fixes TestClientRetriesComputeJobOnPrimaryAndDefaultNodes.

Same approach as in Java: #2975

@ptupitsyn ptupitsyn requested a review from isapego December 21, 2023 09:13
@ptupitsyn ptupitsyn merged commit 164bb42 into apache:main Dec 22, 2023
@ptupitsyn ptupitsyn deleted the ignite-21033 branch December 22, 2023 12:33
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