Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Do not retry when there's an ambient transaction #621

Merged
merged 4 commits into from
Dec 14, 2018

Conversation

SeanFeldman
Copy link
Collaborator

@SeanFeldman SeanFeldman commented Dec 13, 2018

Fixes #615

Fix is following recommendation made on the issue:

The RetryPolicy should understand whether the operation is within a transaction scope or not. If it is, it should never retry. And this should be documented properly.

TODO

  • Implement change to skip retries when an ambient transaction is detected
  • Document this behavior (XMLdocs, anywhere else?)
  • Verify with tests
  • Release as a hotfix 3.2.1

@SeanFeldman SeanFeldman requested a review from a team as a code owner December 13, 2018 01:20
@SeanFeldman SeanFeldman added this to the 3.2.1 milestone Dec 13, 2018
@SeanFeldman SeanFeldman self-assigned this Dec 13, 2018
@SeanFeldman SeanFeldman changed the title Do not retry when there's an ambient transaction [WIP] Do not retry when there's an ambient transaction Dec 13, 2018
@SeanFeldman
Copy link
Collaborator Author

SeanFeldman commented Dec 13, 2018

ReceiveAndDelete tests are flaky imo.

E.g. QueueClientTests.ReceiveDeleteTest is failing. It's supposed to send 10 messages and receive back 10. The way it's implemented is using TestUtility.ReceiveMessagesAsync(count). Internally, this method is running a tight loop of 5 attempts to receive all messages from an entity. Problem with this approach is that tight loop might be too fast for the broker to return all messages, resulting in a flaky tests, failing due to incorrect number of messages returned. For the test verification, I'll add a delay between attempts to see if that helps.

… to allow timeout specification to handle flaky tests
@SeanFeldman SeanFeldman changed the title [WIP] Do not retry when there's an ambient transaction Do not retry when there's an ambient transaction Dec 13, 2018
@SeanFeldman
Copy link
Collaborator Author

Green and ready.

@nemakam nemakam merged commit a1e637d into Azure:dev Dec 14, 2018
@SeanFeldman SeanFeldman deleted the retry-policy-issue-615 branch December 14, 2018 01:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RetryPolicy is causing transaction exception for connectivity issue
2 participants