[Internal] PPAF: Fixes Hub region header never sent due to premature NoRetry on single-master 404/1002.#5792
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
kushagraThapar
left a comment
There was a problem hiding this comment.
Since this is specifically fixed for single master, I wonder if we can add some tests for multi-master account? making sure the retries are same in multi-master and are correct.
@jeet1995 can you please review this PR as well, thanks!
f8f93e5
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
We have multi-master tests already added ensuring that this header is not there |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
3e36025 to
3172747
Compare
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
@sdkReviewAgent-2 |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
✅ Review complete (22:21) Posted 2 inline comment(s). Steps: ✓ context, correctness, cross-sdk, design, history, past-prs, synthesis, test-coverage |
Pull Request Template
Description
PR Description
Summary
Fixes a bug in
ClientRetryPolicy.ShouldRetryOnSessionNotAvailablewhere the hub region processing header (x-ms-cosmos-hub-region-processing-only) was set but never actually sent to the backend on single-master accounts. The retry thresholdsessionTokenRetryCount > 1causedNoRetryimmediately after the header flag was set, preventing the retry that would carry the header.Fix
Changed
sessionTokenRetryCount > 1→sessionTokenRetryCount > 2.Corrected Flow
countbefore methodcount++count > 20 >= 1= false)1 > 2= false1 >= 1= true)2 > 2= false3 > 2= trueEnd-to-End Hub Region Discovery (Happy Path with 403/3)
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #IssueNumber