Summary
sdk/data/azcosmos/sdk_capabilities.go declares only supportedCapabilitiesPartitionMerge = 1 << 0. Java's HttpConstants.SDKSupportedCapabilities (lines 313-333) sends PARTITION_MERGE | CHANGE_FEED_WITH_START_TIME_POST_MERGE | IGNORE_UNKNOWN_RNTBD_TOKENS = 1+2+8 = 11.
Per the design-doc reference cosmosdb-design-docs/12-change-feed.md#partition-merge-startfrom-timestamp-scenarios-and-performance-concerns ("Critical Backend Finding" callout), the backend rejects change feed reads with If-Modified-Since on merged partitions when this capability bit is missing → 400 Bad Request: "IfModifiedSince is not currently supported with merged partitions."
Customer impact
Calling ContainerClient.GetChangeFeed with ChangeFeedOptions.StartFrom set against a container that has had merges will hard-400. The 410 retry loop introduced by #26768 won't catch a 400, so the failure is uncatchable below the public API.
Proposed fix
Add supportedCapabilitiesChangeFeedWithStartTimePostMerge = 1 << 1 (and supportedCapabilitiesIgnoreUnknownRntbdTokens = 1 << 3 for full Java parity) and OR them into the header value emitted by every request.
Context
cc @tvaron3 @simorenoh
Summary
sdk/data/azcosmos/sdk_capabilities.godeclares onlysupportedCapabilitiesPartitionMerge = 1 << 0. Java'sHttpConstants.SDKSupportedCapabilities(lines 313-333) sendsPARTITION_MERGE | CHANGE_FEED_WITH_START_TIME_POST_MERGE | IGNORE_UNKNOWN_RNTBD_TOKENS = 1+2+8 = 11.Per the design-doc reference
cosmosdb-design-docs/12-change-feed.md#partition-merge-startfrom-timestamp-scenarios-and-performance-concerns("Critical Backend Finding" callout), the backend rejects change feed reads withIf-Modified-Sinceon merged partitions when this capability bit is missing →400 Bad Request: "IfModifiedSince is not currently supported with merged partitions."Customer impact
Calling
ContainerClient.GetChangeFeedwithChangeFeedOptions.StartFromset against a container that has had merges will hard-400. The 410 retry loop introduced by #26768 won't catch a 400, so the failure is uncatchable below the public API.Proposed fix
Add
supportedCapabilitiesChangeFeedWithStartTimePostMerge = 1 << 1(andsupportedCapabilitiesIgnoreUnknownRntbdTokens = 1 << 3for full Java parity) and OR them into the header value emitted by every request.Context
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/HttpConstants.javalines 313-334;RxDocumentClientImpl.javalines 2562-2568 (header populated on every request).cc @tvaron3 @simorenoh