Skip to content

A50: Exclude locally-initiated client cancellations from Call Counter (#12923) - #1

Closed
AgraVator wants to merge 2 commits into
masterfrom
a50-client-cancellations
Closed

A50: Exclude locally-initiated client cancellations from Call Counter (#12923)#1
AgraVator wants to merge 2 commits into
masterfrom
a50-client-cancellations

Conversation

@AgraVator

@AgraVator AgraVator commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

Clarifies gRFC A50 (A50-xds-outlier-detection.md) to explicitly define that locally-initiated client-side cancellations MUST be excluded from the Outlier Detection Call Counter (successCount and failureCount), following the cross-language discussion consensus.

Key Clarifications

  1. Picker Counting (~line 140): Excludes locally-initiated client-side cancellations (hedging cancellations, application CANCELLED, and DEADLINE_EXCEEDED) from counter increments on call completion.
  2. Call Counter (~line 173): Clarifies that active buckets track successCount and failureCount, omitting locally cancelled calls.
  3. Rationale (~line 285): Explains that locally-initiated client-side cancellations (including DEADLINE_EXCEEDED, which is treated as a client-side cancellation from first principles and for implementation simplicity) are excluded from outlier detection counting to align with Envoy's resetStream() behavior and prevent false-positive ejections during hedging.

Discrepancy with gRPC-Java PR #12923

  • Discussion Consensus (Source of Truth): In the discussion thread, Mark Roth concluded that DEADLINE_EXCEEDED should be treated as a cancellation and excluded from outlier detection counting along with hedging cancellations and application CANCELLED.
  • Implementation Discrepancy: gRPC-Java PR grpc/grpc-java#12923 currently only checks status.getCode() == Status.Code.CANCELLED in AbstractClientStream.java (line 460). Because DEADLINE_EXCEEDED has its own distinct status code in Java (Status.Code.DEADLINE_EXCEEDED), PR #12923 does not yet exclude DEADLINE_EXCEEDED from Call Counters.
  • Action Required: PR #12923 should be updated to also trigger clientCancelled(status) when status.getCode() == Status.Code.DEADLINE_EXCEEDED to match this gRFC and the cross-language consensus.

Related Work

@AgraVator AgraVator closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant