Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
93f03a3
Introducing Gateway V2.0 dedicated HTTP timeout policy.
jeet1995 Feb 2, 2026
35d94f3
Introducing Gateway V2.0 dedicated HTTP timeout policy.
jeet1995 Feb 2, 2026
3c126cb
Introducing Gateway V2.0 dedicated HTTP timeout policy.
jeet1995 Feb 2, 2026
7adaacb
Introducing Gateway V2.0 dedicated HTTP timeout policy.
jeet1995 Feb 5, 2026
512d06a
Merge branch 'Azure:main' into AzCosmos_HttpTimeoutPolicyChangesGatew…
jeet1995 Feb 9, 2026
94d4cb2
Clean up.
jeet1995 Feb 9, 2026
c38f7ae
Clean up.
jeet1995 Feb 9, 2026
ab70db3
Clean up.
jeet1995 Feb 9, 2026
610ad49
FixFewTests-part2 (#47933)
xinlian12 Feb 9, 2026
c93869b
Remove test-jar dependency with copied code (#47917)
alzimmermsft Feb 9, 2026
deaa2b3
[VoiceLive]Add Foundry Agent integration, filler responses, and reaso…
xitzhang Feb 9, 2026
57bd4f8
Remove mssql-jdbc dependency and update assertj-core (#47945)
alzimmermsft Feb 9, 2026
2781d4f
[VoiceLive]Release 1.0.0-beta.4 (#47946)
xitzhang Feb 9, 2026
d2de5eb
[AutoPR azure-resourcemanager-nginx]-generated-from-SDK Generation - …
azure-sdk Feb 10, 2026
fc2da2f
Update wrong data type (#47937)
sandeepdhamija Feb 10, 2026
9d1c4cf
Deprecating azure-resourcemanager-mixedreality (#47943)
MichaelZp0 Feb 10, 2026
4ae43d4
[Automation] Generate SDK based on TypeSpec 0.39.1 (#47953)
azure-sdk Feb 10, 2026
486f7d2
Increment package versions for mixedreality releases (#47955)
azure-sdk Feb 10, 2026
96edfbb
fixFewTests - Part3 (#47939)
xinlian12 Feb 10, 2026
1999049
Re-enable spring-cloud-azure-starter-monitor for Spring Boot 4 (#47951)
Copilot Feb 10, 2026
3294b99
Clean up.
jeet1995 Feb 10, 2026
7238e33
Clean up.
jeet1995 Feb 10, 2026
d81307b
Migrate azure-search-documents to TypeSpec (#47819)
alzimmermsft Feb 10, 2026
04d1389
Increment package versions for nginx releases (#47965)
azure-sdk Feb 10, 2026
5fb1ad6
Increment package versions for ai releases (#47947)
azure-sdk Feb 10, 2026
e12c45b
escapeNonAscIIPkValueForQueryPlanAndQuery (#47881)
xinlian12 Feb 10, 2026
2ef4708
Deprecate AgriFood FarmBeats SDK and code cleanup (#47935)
samvaity Feb 10, 2026
d472305
Search TypeSpec migration - remove last few BinaryData APIs from publ…
alzimmermsft Feb 10, 2026
2b6c73d
Fix GraalVM native image compatibility for AzureIdentityEnvVars (#47940)
g2vinay Feb 10, 2026
4e7408b
Release azure-cosmos 4.78.0, azure-cosmos-encryption 2.27.0, and Spar…
xinlian12 Feb 11, 2026
2e9ea28
Fix: Include stack trace in token error logs (#47974)
g2vinay Feb 11, 2026
49294c0
[AutoPR azure-resourcemanager-resources-deploymentstacks]-generated-f…
azure-sdk Feb 11, 2026
905a8d6
Set default values for head_sha and repo_url in generate_typespec_pro…
Copilot Feb 11, 2026
7d1046e
Increment package versions for cosmos releases (#47983)
azure-sdk Feb 11, 2026
45ef854
Nregion synchronous commit feature (#47757)
mbhaskar Feb 12, 2026
a1dffe9
Add ConnectionDetails support for EventHubs (#47926)
Copilot Feb 12, 2026
88e14b0
Increment package versions for edgeactions releases (#47991)
azure-sdk Feb 12, 2026
753f744
mgmt network, update api-version to 2025-05-01 (#47831)
v-huizhu2 Feb 12, 2026
f3d135f
[AutoPR azure-resourcemanager-computebulkactions]-generated-from-SDK …
azure-sdk Feb 12, 2026
047ff77
Increment package versions for disconnectedoperations releases (#47992)
azure-sdk Feb 12, 2026
4dd4c40
Increment package versions for network releases (#47994)
azure-sdk Feb 12, 2026
a4bc25d
Deprecating azure-mixedreality-authentication (#47942)
MichaelZp0 Feb 12, 2026
276cee5
Remove all MixedReality SDKs (#47885)
MichaelZp0 Feb 12, 2026
a4cfbdd
Remove Operational Insights from CODEOWNERS (#47989)
ronniegeraghty Feb 12, 2026
54cd75d
Update service owners to AzureSdkOwners in CODEOWNERS (#47988)
ronniegeraghty Feb 12, 2026
70396e5
Fix java - spring - tests by adding Thread.sleep (#47990)
rujche Feb 12, 2026
0aeccb8
Change PRLabel from %Azure Quantum to %Quantum (#47948)
ronniegeraghty Feb 12, 2026
7f09460
Remove commented Device Provisioning Service owners (#47949)
ronniegeraghty Feb 12, 2026
55920c3
Add checkstyle rule to validate serialization method completeness (#4…
Copilot Feb 12, 2026
b4a83ce
Fix pipeline failure about linting-extensions (#48005)
rujche Feb 13, 2026
52002b1
Only publish docs.ms and github.io docs if publishing to Maven (#47997)
danieljurek Feb 13, 2026
dd32b1b
avoidExtraQuery (#47996)
xinlian12 Feb 13, 2026
17fbc78
Sync eng/common directory with azure-sdk-tools for PR 13968 (#48004)
azure-sdk Feb 13, 2026
d8550cc
Configurations: 'specification/codesigning/CodeSigning.Management/ts…
azure-sdk Feb 14, 2026
682229f
[Automation] Generate SDK based on TypeSpec 0.39.2 (#48006)
azure-sdk Feb 14, 2026
4e3c313
[VoiceLive] Update for agent V2, remove foundry tools, rename filler …
xitzhang Feb 14, 2026
81b998a
[VoiceLive] Release 1.0.0-beta.5 (#48013)
xitzhang Feb 14, 2026
416e7b5
Ignore implementation packages when generating docs (#47998)
srnagar Feb 14, 2026
7c4e3cb
Increment package versions for artifactsigning releases (#48017)
azure-sdk Feb 16, 2026
7ecbfd6
[AutoPR azure-resourcemanager-managedops]-generated-from-SDK Generati…
azure-sdk Feb 16, 2026
edcf070
[Kafka connector]AddSupportForThroughputBucket (#48009)
xinlian12 Feb 17, 2026
289c832
mgmt, trustedsigning, update to next preview (#48016)
weidongxu-microsoft Feb 17, 2026
f2e6b14
- Adding nregion feature to changelog (#47987)
mbhaskar Feb 17, 2026
9b1a477
Increment package versions for resources releases (#48020)
azure-sdk Feb 17, 2026
7c3932c
Increment package versions for managedops releases (#48027)
azure-sdk Feb 18, 2026
67073ae
Remove unused UnitSpec from fabric-cosmos-spark-auth_3 (#48010)
Copilot Feb 18, 2026
229de3f
update release date (#48029)
ryazhang-microsoft Feb 18, 2026
5b3d14c
Replace `azd config list` with `azd auth status` in TROUBLESHOOTING.m…
scottaddie Feb 18, 2026
31e1a1b
Bug 47910.count query text block (#47911)
Blackbaud-JasonBodnar Feb 18, 2026
94bc255
Add tests for LAZY indexing mode in Cosmos Java SDK (#48024)
Copilot Feb 18, 2026
c98c130
Storage - STG101 Beta Features (#48019)
ibrandes Feb 18, 2026
9f473ec
Increment package versions for ai releases (#48035)
azure-sdk Feb 18, 2026
85a90f3
Adding tests to associate channel lifecycle with Netty's ReadTimeoutE…
jeet1995 Feb 18, 2026
f21a5ab
Update changelog and README files for multiple Azure Storage SDK comp…
ibrandes Feb 18, 2026
bd4365b
Replace ThreadLocal Collator with instance Collator (#48037)
alzimmermsft Feb 19, 2026
85bd7a0
Update azd section of Identity troubleshooting guide (#48038)
scottaddie Feb 19, 2026
dce90cc
Open Storage - STG101 Beta Release Date Bump (#48045)
ibrandes Feb 19, 2026
beb5bb9
[SparkConnector]updateTransactionalBulkConfig (#48008)
xinlian12 Feb 19, 2026
38064d5
[SparkConnector]IncludeOperationStatusCodeHistoryInStaleProgressLogs …
xinlian12 Feb 19, 2026
9c8603b
Update to use JDK's deafult trust CA store for cert validations (#48046)
samvaity Feb 19, 2026
2f66b3a
Fix Netty ByteBuf leak in RxGatewayStoreModel via doFinally safety ne…
kushagraThapar Feb 20, 2026
00621cb
Adding tests to associate channel lifecycle with Netty's ReadTimeoutE…
jeet1995 Feb 20, 2026
e4bcbe1
Add Azure Artifacts Feed Setup section to CONTRIBUTING.md (#48032)
raych1 Feb 20, 2026
c8c2ec2
Use CFS as the package resolution source (#47901)
raych1 Feb 20, 2026
b44d84a
Fix: PublishDevFeedPackage runs in parallel with VerifyReleaseVersion…
Copilot Feb 20, 2026
dcf8ecd
Add e2ePolicyCfg to GatewayStatistics for timeout policy diagnostics
jeet1995 Feb 21, 2026
fe100e1
Remove implementation/TestSuiteBase.java and consolidate to rx/TestSu…
Copilot Feb 21, 2026
4548099
Part 1: Add multi-parent-channel and retry-parentChannelId tests
jeet1995 Feb 22, 2026
152d405
Part 1: Fix retryUsesConsistentParentChannelId + add evidence MD
jeet1995 Feb 22, 2026
706edd6
OpenSpec: Rectify Part 2 spec — 1s GW V2 connect/acquire timeout bifu…
jeet1995 Feb 22, 2026
1e0cc12
Part 1: ALL 7/7 PASSED — relaxed tc netem assertions for kernel TCP RST
jeet1995 Feb 22, 2026
80460bf
Generating `azure-ai-projects` from latest spec (#47875)
jpalvarezl Feb 23, 2026
2dcce8b
Clean up
jeet1995 Feb 23, 2026
400894e
Merge branch 'main' of https://github.com/jeet1995/azure-sdk-for-java…
jeet1995 Feb 23, 2026
4c2aca9
Merge branch 'Azure:main' into AzCosmos_HttpTimeoutPolicyChangesGatew…
jeet1995 Feb 23, 2026
ceb99ba
Clean up.
jeet1995 Feb 23, 2026
c582a85
Adding tests with manual packet delay tests.
jeet1995 Feb 23, 2026
2d5228f
Addressing comments.
jeet1995 Feb 26, 2026
49bfddb
Clean up.
jeet1995 Feb 27, 2026
467b8b8
Merge branch 'Azure:main' into AzCosmos_HttpTimeoutPolicyChangesGatew…
jeet1995 Feb 27, 2026
cc8c0bd
Clean up.
jeet1995 Feb 27, 2026
6460378
Merge branch 'AzCosmos_HttpTimeoutPolicyChangesGatewayV2' of https://…
jeet1995 Feb 27, 2026
af4b085
Merge branch 'Azure:main' into AzCosmos_HttpTimeoutPolicyChangesGatew…
jeet1995 Feb 28, 2026
e58f218
Bifurcate connect / connection acquire timeout between Gateway V1 and…
jeet1995 Feb 28, 2026
0b04dfd
Bifurcate connect / connection acquire timeout between Gateway V1 and…
jeet1995 Mar 3, 2026
bc3b20f
Bifurcate connect / connection acquire timeout between Gateway V1 and…
jeet1995 Mar 3, 2026
68d8ff2
Bifurcate connect / connection acquire timeout between Gateway V1 and…
jeet1995 Mar 3, 2026
7aa55db
Bifurcate connect / connection acquire timeout between Gateway V1 and…
jeet1995 Mar 3, 2026
56167ce
Bifurcate connect / connection acquire timeout between Gateway V1 and…
jeet1995 Mar 3, 2026
ce5aa01
Merge branch 'main' of https://github.com/jeet1995/azure-sdk-for-java…
jeet1995 Mar 4, 2026
ccf19a9
Bifurcate connect / connection acquire timeout between Gateway V1 and…
jeet1995 Mar 4, 2026
668a3da
Fixing merge.
jeet1995 Mar 4, 2026
85d8312
Fixing merge.
jeet1995 Mar 4, 2026
d14b38f
Fixing tests.
jeet1995 Mar 4, 2026
583da07
Fixing tests.
jeet1995 Mar 4, 2026
3bd012b
Merge branch 'main' of https://github.com/jeet1995/azure-sdk-for-java…
jeet1995 Mar 4, 2026
f694118
Addressing review comments.
jeet1995 Mar 4, 2026
83e2cff
Addressing review comments.
jeet1995 Mar 4, 2026
2a23a8c
Addressing review comments.
jeet1995 Mar 4, 2026
a01ecfe
Addressing review comments.
jeet1995 Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions sdk/cosmos/azure-cosmos-tests/CONNECT_TIMEOUT_TESTING_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Http2ConnectTimeoutBifurcationTests — Connect Timeout Testing

## What This Tests

`Http2ConnectTimeoutBifurcationTests` validates that the TCP connect timeout (`CONNECT_TIMEOUT_MILLIS`) is
correctly bifurcated between Gateway V1 metadata (45s) and Gateway V2 thin client data plane (5s default).
Uses Linux `iptables` to DROP SYN packets and `tc netem` with `iptables mangle` for per-port delay.

**Key invariant proven:** Thin client data plane requests fail fast (5s connect timeout) while
metadata requests on port 443 remain unaffected (45s timeout).

## Why Not SDK Fault Injection?

SDK `CONNECTION_DELAY` delays at the HTTP/Mono layer — the TCP handshake already completed.
`CONNECT_TIMEOUT_MILLIS` fires at the TCP SYN→SYN-ACK layer, which requires blocking at the kernel.
Only `iptables DROP SYN` prevents the TCP handshake, triggering the real netty `ConnectTimeoutException`.

## Prerequisites

- Docker Desktop with Linux containers
- Docker memory: **8 GB+**
- A Cosmos DB account with thin client enabled
- System properties: `COSMOS.THINCLIENT_ENABLED=true`, `COSMOS.THINCLIENT_CONNECTION_TIMEOUT_IN_SECONDS=5` (default; override to 1 for fast-fail local tests)
- Credentials in `sdk/cosmos/cosmos-v4.properties`

## Build & Run

Same Docker setup as `NETWORK_DELAY_TESTING_README.md`, with additional system properties:

```bash
# See NETWORK_DELAY_TESTING_README.md for full Docker run setup
# (credential env vars, volume mounts, image build).
# Additional system properties for connect timeout tests:
docker run --rm --cap-add=NET_ADMIN --memory 8g \
... \
cosmos-netem-test bash -c '
cd /workspace && \
java -DCOSMOS.THINCLIENT_ENABLED=true \
-DCOSMOS.THINCLIENT_CONNECTION_TIMEOUT_IN_SECONDS=1 \
-DCOSMOS.HTTP2_ENABLED=true \
org.testng.TestNG /workspace/azure-cosmos-tests/src/test/resources/manual-thinclient-network-delay-testng.xml \
-verbose 2
'
```

## Network Commands Used

### iptables DROP SYN — Block New TCP Connections

```bash
# Block TCP handshake to thin client port
iptables -A OUTPUT -p tcp --dport 10250 --tcp-flags SYN,ACK,FIN,RST SYN -j DROP

# Remove rule
iptables -D OUTPUT -p tcp --dport 10250 --tcp-flags SYN,ACK,FIN,RST SYN -j DROP
```

Drops only the initial SYN packet. Server never sees the connection. Client's TCP stack
retransmits with exponential backoff. Netty's `CONNECT_TIMEOUT_MILLIS` fires after 1s →
`ConnectTimeoutException`. Existing connections are unaffected.

### Per-Port Delay — tc prio + iptables mangle

```bash
# 1. Create 3-band priority qdisc
tc qdisc add dev eth0 root handle 1: prio bands 3

# 2. Attach delays to bands
tc qdisc add dev eth0 parent 1:1 handle 10: netem delay 5000ms # port 443 SYN
tc qdisc add dev eth0 parent 1:2 handle 20: netem delay 5000ms # port 10250 SYN
tc qdisc add dev eth0 parent 1:3 handle 30: pfifo_fast # everything else

# 3. Mark SYN-ONLY packets by port
iptables -t mangle -A OUTPUT -p tcp --dport 443 --tcp-flags SYN,ACK,FIN,RST SYN -j MARK --set-mark 1
iptables -t mangle -A OUTPUT -p tcp --dport 10250 --tcp-flags SYN,ACK,FIN,RST SYN -j MARK --set-mark 2

# 4. Route marks to bands
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw flowid 1:1
tc filter add dev eth0 parent 1:0 protocol ip prio 2 handle 2 fw flowid 1:2

# Cleanup
tc qdisc del dev eth0 root
iptables -t mangle -F OUTPUT
```

Port 443 gets 5s SYN delay (< 45s connect timeout → succeeds;
5s > 1s thin client timeout → proves metadata uses 45s, not 1s).
Port 10250 gets 5s SYN delay (> 1s thin client connect timeout → fails).
**Same delay, different outcomes** — the only variable is the CONNECT_TIMEOUT_MILLIS value.

**Why SYN-only delay?** tc netem delays every packet it matches. Delaying ALL packets causes
TLS handshake timeout (sslHandshakeTimeout=10s), HTTP response timeout, and premature
connection close — all unrelated to CONNECT_TIMEOUT_MILLIS. SYN-only delay isolates the
TCP connect phase, which is exactly what CONNECT_TIMEOUT_MILLIS controls.

**Critical tc detail:** The `prio` qdisc's default priomap sends unmarked traffic to
band 1 (the first delay band). A catch-all filter (`u32 match u32 0 0 flowid 1:3`)
is required to route non-SYN traffic to band 3 (no delay).

## Tests

| Test | Technique | What It Proves |
|------|-----------|---------------|
| `connectTimeout_GwV2_DataPlane_1sFiresOnDroppedSyn` | iptables DROP SYN on 10250 | Data plane fails in ~1s, not 45s |
| `connectTimeout_GwV1_Metadata_UnaffectedByGwV2Drop` | iptables DROP SYN on 10250 only | Metadata on 443 unaffected |
| `connectTimeout_GwV2_PreciseTiming` | iptables DROP SYN, 3s e2e | ≥2 connect attempts in 3s budget (proving 1s each) |
| `connectTimeout_Bifurcation_DelayBased_...` | tc prio + SYN-only mangle | Same 5s SYN delay on both ports: 443 succeeds (5s < 45s), 10250 fails (5s > 1s) |

## Important Notes

- Tests run **sequentially** — tc/iptables are interface-global
- `--cap-add=NET_ADMIN` required for both `tc` and `iptables`
- `@AfterClass` removes all iptables rules (`alwaysRun=true`)
- System property `COSMOS.THINCLIENT_CONNECTION_TIMEOUT_IN_SECONDS=1` sets the 1s bifurcated timeout
Loading
Loading