You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace native reactor-netty pingAckTimeout (incompatible with custom
evictionPredicate) with a manual Http2PingHandler ChannelDuplexHandler
installed on the parent H2 channel.
The handler:
- Tracks last read/write activity on the parent channel
- Schedules PING frames when idle > configured interval (default 10s)
- Counts PINGs sent and ACKs received (for observability/testing)
- Does NOT close the connection on missed ACKs (keepalive only)
- Detected via Http2MultiplexHandler in pipeline (not channel.parent())
Key finding: reactor-netty's first doOnConnected fires for the parent
TCP channel (parent()==null), not stream channels. H2 parent detection
uses Http2MultiplexHandler presence in the pipeline.
Removed degradedConnectionEvictedByPingHealthCheck test — PING is
keepalive-only, not eviction. Degraded connections handled by response
timeout retry path (6s/6s/10s escalation -> cross-region failover).
Test: pingFramesSentAndAcknowledgedOnIdleConnection
- Installs Http2PingHandler via doOnConnectedCallback on H2 parent
- Configures 3s PING interval, waits 20s idle
- Asserts pingsSent > 0 (proven: pingsSent=5, pingAcksReceived=10)
- Asserts connection survived (same parentChannelId)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/Http2ConnectionLifecycleTests.java
+92-63Lines changed: 92 additions & 63 deletions
Original file line number
Diff line number
Diff line change
@@ -919,69 +919,6 @@ public void perConnectionJitterStaggersEviction() throws Exception {
919
919
}
920
920
}
921
921
922
-
/**
923
-
* Proves that when a connection is silently degraded (packets dropped, no TCP RST),
924
-
* the PING health check detects the degradation (no ACK received within timeout),
925
-
* the eviction predicate evicts the connection, and the next request succeeds on a new connection.
926
-
*
927
-
* Configuration:
928
-
* - Max lifetime = 600s (intentionally HIGH — we don't want lifetime to trigger eviction)
0 commit comments