Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport to 1.46.x: priority and ring_hash LBs: fix interactions when using ring_hash under priority (#29332) #30253

Merged
merged 1 commit into from Jul 11, 2022

Conversation

yashykt
Copy link
Member

@yashykt yashykt commented Jul 8, 2022

…er priority (#29332)

  • refactor connection delay injection from client_lb_end2end_test

  • fix build

  • fix build on older compilers

  • clang-format

  • buildifier

  • a bit of code cleanup

  • start failover time whenever the child reports CONNECTING, and don't cancel when deactivating

  • clang-format

  • rewrite test

  • simplify logic in priority policy

  • clang-format

  • switch to using a bit to indicate child healthiness

  • fix reversed comment

  • more changes in priority and ring_hash.

priority:

  • go back to starting failover timer upon CONNECTING, but only if seen
    READY or IDLE more recently than TRANSIENT_FAILURE

ring_hash:

  • don't flap back and forth between IDLE and CONNECTING; once we go
    CONNECTING, we stay there until either TF or READY
  • after the first subchannel goes TF, we proactively start another
    subchannel connecting, just like we do after a second subchannel
    reports TF, to ensure that we don't stay in CONNECTING indefinitely if
    we aren't getting any new picks
  • always return ring hash's picker, regardless of connectivity state
  • update the subchannel connectivity state seen by the picker upon
    subchannel list creation
  • start proactive subchannel connection attempt upon subchannel list
    creation if needed
  • ring_hash: fix connectivity state seen by aggregation and picker

  • fix obiwan error

  • swap the order of ring_hash aggregation rules 3 and 4

  • restore original test

  • refactor connection injector QueuedAttempt code

  • add test showing that ring_hash will continue connecting without picks

  • clang-format

  • don't actually need seen_failure_since_ready_ anymore

  • fix TSAN problem

  • address code review comments

…er priority (grpc#29332)

* refactor connection delay injection from client_lb_end2end_test

* fix build

* fix build on older compilers

* clang-format

* buildifier

* a bit of code cleanup

* start failover time whenever the child reports CONNECTING, and don't cancel when deactivating

* clang-format

* rewrite test

* simplify logic in priority policy

* clang-format

* switch to using a bit to indicate child healthiness

* fix reversed comment

* more changes in priority and ring_hash.

priority:
- go back to starting failover timer upon CONNECTING, but only if seen
  READY or IDLE more recently than TRANSIENT_FAILURE

ring_hash:
- don't flap back and forth between IDLE and CONNECTING; once we go
  CONNECTING, we stay there until either TF or READY
- after the first subchannel goes TF, we proactively start another
  subchannel connecting, just like we do after a second subchannel
  reports TF, to ensure that we don't stay in CONNECTING indefinitely if
  we aren't getting any new picks
- always return ring hash's picker, regardless of connectivity state
- update the subchannel connectivity state seen by the picker upon
  subchannel list creation
- start proactive subchannel connection attempt upon subchannel list
  creation if needed

* ring_hash: fix connectivity state seen by aggregation and picker

* fix obiwan error

* swap the order of ring_hash aggregation rules 3 and 4

* restore original test

* refactor connection injector QueuedAttempt code

* add test showing that ring_hash will continue connecting without picks

* clang-format

* don't actually need seen_failure_since_ready_ anymore

* fix TSAN problem

* address code review comments
@yashykt yashykt merged commit 2d9bdfc into grpc:v1.46.x Jul 11, 2022
@yashykt yashykt deleted the Backport29332to146 branch May 18, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants