Skip to content

InternalSubChannel doesn't comply with the connectivity state spec #2873

@zhangkun83

Description

@zhangkun83

When receiving a GOAWAY (transportShutdown() callback), InternalSubChannel unconditionally transitions to IDLE. However, the spec says

  1. READY transitions to TRANSIENT_FAILURE on "any failure encountered while expecting successful communication on established channel."
  2. "Channels that receive a GOAWAY when there are no active or pending RPCs should also switch to IDLE".

InternalSubchannel needs to look at the status passed to transportShutdown():

  • If it's not OK, according to Rule 1 above, the new state should be TRANSIENT_FAILURE
  • If it's OK, then it's a GOAWAY.
    • If the in-use state of the subchannel is false, according to Rule 2 above, the new state should be IDLE.
    • Otherwise, the spec doesn't say what the new state should be. Apparently it cannot stay in READY. It cannot go to TRANSIENT_FAILURE either because it's a GOAWAY, not an error. This part of the spec should be revisited.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions