-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintain thread affinity during non-TKO failovers
Summary: When failing over, make an educated guess as to whether thread affinity still applies to the failover tier. This is done by inspecting the failover result code. It thread affinity is likely to be broken, `SRRoute` will attempt to jump threads to restore affinity. TKO errors should not affect thread affinity, as `traverse()` is aware of TKO hosts and should be able to predict a failover in that case: ``` FailoverRoute |-> traverse(): failover1 `-> route() |-> primary: TKO `-> failover1: SUCCESS // <- thread affinity ``` ``` FailoverRoute |-> traverse(): failover2 `-> route() |-> primary: TKO |-> failover1: TKO `-> failover2: SUCCESS // <- thread affinity ``` A non-TKO error, on the other hand, will break thread affinity. For instance, during S459689: ``` FailoverRoute |-> traverse(): failover2 `-> route() |-> primary: TKO |-> failover1: BUSY // <- original thread affinity `-> failover2: SUCCESS // jump threads ``` Reviewed By: disylh, stuclar Differential Revision: D65231378 fbshipit-source-id: be9f40aa08eb20d07374064ad99c09a63158b653
- Loading branch information
1 parent
cbf97f7
commit 85facb9
Showing
6 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters