Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos DB Java SDK Diagnostics report incorrect region for multi-region accounts #40696

Closed
ajdasari1231 opened this issue Jun 19, 2024 · 2 comments · Fixed by #41045
Closed
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@ajdasari1231
Copy link

Describe the bug
Although the storePhysicalAddress shows federation in East US 2, the regionsContacted show as 'Central US'.
There might be a bug in the diagnostics reporting that's causing the regionsContacted parameter incorrectly showing the region closest to the application region instead of East US 2.

Exception or Stack Trace
{"userAgent":"azsdk-java-cosmos/4.54.0 Linux/5.15.138-flatcar JRE/11.0.22 az-sd-cos/5.9.1","activityId":"f778c1b0-f5b6-48f0-8f67-76d226b3b10a","requestLatencyInMs":1,"requestStartTimeUTC":"2024-05-23T18:29:58.255027Z","requestEndTimeUTC":"2024-05-23T18:29:58.256602Z","responseStatisticsList":[{"storeResult":{"storePhysicalAddress":"rntbd://cdb-ms-prod-eastus2-fd85.documents.azure.com:14132/apps/f022a735-9228-4a49-a4f6-6730f3a7a62e/services/9608947d-af00-4352-83aa-18154d60d350/partitions/7760939a-8311-4de8-aa8e-2fae44f36a37/replicas/133579944847834602s/","lsn":311067,"globalCommittedLsn":311066,"partitionKeyRangeId":"0","isValid":true,"statusCode":200,"subStatusCode":0,"isGone":false,"isNotFound":false,"isInvalidPartition":false,"isThroughputControlRequestRateTooLarge":false,"requestCharge":1.05,"itemLSN":57606,"sessionToken":"0:0#311067#3=-1","backendLatencyInMs":0.502,"retryAfterInMs":null,"replicaStatusList":["14132:Connected","14064:Connected","14465:Connected","14036:Connected"],"transportRequestTimeline":[{"eventName":"created","startTimeUTC":"2024-05-23T18:29:58.255451Z","durationInMilliSecs":0.002},{"eventName":"queued","startTimeUTC":"2024-05-23T18:29:58.255453Z","durationInMilliSecs":0.0},{"eventName":"channelAcquisitionStarted","startTimeUTC":"2024-05-23T18:29:58.255453Z","durationInMilliSecs":0.008},{"eventName":"pipelined","startTimeUTC":"2024-05-23T18:29:58.255461Z","durationInMilliSecs":0.084},{"eventName":"transitTime","startTimeUTC":"2024-05-23T18:29:58.255545Z","durationInMilliSecs":0.984},{"eventName":"decodeTime","startTimeUTC":"2024-05-23T18:29:58.256529Z","durationInMilliSecs":0.014},{"eventName":"received","startTimeUTC":"2024-05-23T18:29:58.256543Z","durationInMilliSecs":0.045},{"eventName":"completed","startTimeUTC":"2024-05-23T18:29:58.256588Z","durationInMilliSecs":0.0}],"rntbdRequestLengthInBytes":1911,"rntbdResponseLengthInBytes":1735,"requestPayloadLengthInBytes":0,"responsePayloadLengthInBytes":1212,"channelStatistics":{"channelId":"d40b0295","channelTaskQueueSize":0,"pendingRequestsCount":1,"lastReadTime":"2024-05-23T18:29:58.254045Z","waitForConnectionInit":false},"serviceEndpointStatistics":{"availableChannels":1,"acquiredChannels":0,"executorTaskQueueSize":0,"inflightRequests":2,"lastSuccessfulRequestTime":"2024-05-23T18:29:49.257Z","lastRequestTime":"2024-05-23T18:29:58.252Z","createdTime":"2024-05-22T10:06:50.090029Z","isClosed":false,"cerMetrics":{"lastCallTimestamp":"2024-05-23T06:14:17.548587Z","lastActionableContext":"(2024-05-23T06:14:17.548587Z,1)"}}},"requestResponseTimeUTC":"2024-05-23T18:29:58.256602Z","requestStartTimeUTC":"2024-05-23T18:29:58.255451Z","requestResourceType":"Document","requestOperationType":"Read","requestSessionToken":"0:0#311067#3=-1","e2ePolicyCfg":null,"excludedRegions":null}],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["central us"],"retryContext":{"statusAndSubStatusCodes":null,"retryLatency":0,"retryCount":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[],"samplingRateSnapshot":1.0,"systemInformation":{"usedMemory":"1132336 KB","availableMemory":"894928 KB","systemCpuLoad":"(2024-05-23T18:29:32.195623Z 17.8%), (2024-05-23T18:29:37.195602Z 6.3%), (2024-05-23T18:29:42.195549Z 20.4%), (2024-05-23T18:29:47.195602Z 6.6%), (2024-05-23T18:29:52.195540Z 3.2%), (2024-05-23T18:29:57.195546Z 90.8%)","availableProcessors":1},"clientCfgs":{"id":1,"machineId":"uuid:cb4ae3c8-3fa8-4f54-afd2-19b962b3e580","connectionMode":"DIRECT","numberOfClients":1,"excrgns":"[]","clientEndpoints":{"https://va7prod1contentservicedocdbkqqirnug.documents.azure.com:443":1},"connCfg":{"rntbd":"(cto:PT5S, nrto:PT5S, icto:PT0S, ieto:PT1H, mcpe:130, mrpc:30, cer:true)","gw":"(cps:1000, nrto:PT1M, icto:PT1M, p:false)","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}

{"userAgent":"azsdk-java-cosmos/4.54.0 Linux/5.15.138-flatcar JRE/11.0.20 az-sd-cos/5.9.1","activityId":"b63d4cbf-d65e-454a-8ba1-1fd8cc34f9c2","requestLatencyInMs":3,"requestStartTimeUTC":"2024-05-21T07:28:39.963442Z","requestEndTimeUTC":"2024-05-21T07:28:39.966468Z","responseStatisticsList":[{"storeResult":{"storePhysicalAddress":"rntbd://cdb-ms-prod-eastus2-be68.documents.azure.com:14095/apps/531e24ba-b6f0-4882-b9e4-3716e52c78d0/services/47fd09c6-6c7d-45cc-a4a7-cd931404edbf/partitions/29c9cda5-1b91-44e5-8303-32bb88347631/replicas/133385925118397915s/","lsn":402233,"globalCommittedLsn":402233,"partitionKeyRangeId":"0","isValid":true,"statusCode":404,"subStatusCode":0,"isGone":false,"isNotFound":true,"isInvalidPartition":false,"isThroughputControlRequestRateTooLarge":false,"requestCharge":1.0,"itemLSN":-1,"sessionToken":"0:0#402233#3=-1","backendLatencyInMs":0.777,"retryAfterInMs":null,"exceptionMessage":"["Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"]","exceptionResponseHeaders":"{x-ms-last-state-change-utc=Tue, 14 May 2024 04:57:33.198 GMT, x-ms-request-duration-ms=0.777, x-ms-session-token=0:0#402233#3=-1, lsn=402233, x-ms-request-charge=1.00, x-ms-schemaversion=1.17, x-ms-transport-request-id=881951, x-ms-number-of-read-regions=1, x-ms-activity-id=b63d4cbf-d65e-454a-8ba1-1fd8cc34f9c2, x-ms-xp-role=2, x-ms-global-Committed-lsn=402233, x-ms-documentdb-partitionkeyrangeid=0, x-ms-cosmos-llsn=402233, x-ms-serviceversion= version=2.14.0.0}","replicaStatusList":["14095:Connected","14074:Connected","14375:Connected","14410:Connected"],"transportRequestTimeline":[{"eventName":"created","startTimeUTC":"2024-05-21T07:28:39.963831Z","durationInMilliSecs":0.006},{"eventName":"queued","startTimeUTC":"2024-05-21T07:28:39.963837Z","durationInMilliSecs":0.0},{"eventName":"channelAcquisitionStarted","startTimeUTC":"2024-05-21T07:28:39.963837Z","durationInMilliSecs":0.319},{"eventName":"pipelined","startTimeUTC":"2024-05-21T07:28:39.964156Z","durationInMilliSecs":0.178},{"eventName":"transitTime","startTimeUTC":"2024-05-21T07:28:39.964334Z","durationInMilliSecs":1.837},{"eventName":"decodeTime","startTimeUTC":"2024-05-21T07:28:39.966171Z","durationInMilliSecs":0.023},{"eventName":"received","startTimeUTC":"2024-05-21T07:28:39.966194Z","durationInMilliSecs":0.192},{"eventName":"completed","startTimeUTC":"2024-05-21T07:28:39.966386Z","durationInMilliSecs":0.004}],"rntbdRequestLengthInBytes":1926,"rntbdResponseLengthInBytes":311,"requestPayloadLengthInBytes":0,"responsePayloadLengthInBytes":311,"channelStatistics":{"channelId":"8b258a1c","channelTaskQueueSize":1,"pendingRequestsCount":0,"lastReadTime":"2024-05-21T07:09:31.162504Z","waitForConnectionInit":false},"serviceEndpointStatistics":{"availableChannels":3,"acquiredChannels":0,"executorTaskQueueSize":0,"inflightRequests":1,"lastSuccessfulRequestTime":"2024-05-21T07:28:03.924Z","lastRequestTime":"2024-05-21T07:28:03.919Z","createdTime":"2024-05-18T12:08:30.484700Z","isClosed":false,"cerMetrics":{}}},"requestResponseTimeUTC":"2024-05-21T07:28:39.966468Z","requestStartTimeUTC":"2024-05-21T07:28:39.963831Z","requestResourceType":"Document","requestOperationType":"Read","requestSessionToken":"0:0#402232#3=-1","e2ePolicyCfg":null,"excludedRegions":null}],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["central us"],"retryContext":{"statusAndSubStatusCodes":null,"retryLatency":0,"retryCount":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[],"samplingRateSnapshot":1.0,"systemInformation":{"usedMemory":"972282 KB","availableMemory":"1054982 KB","systemCpuLoad":"(2024-05-21T07:28:14.609322Z 3.6%), (2024-05-21T07:28:19.609420Z 3.6%), (2024-05-21T07:28:24.609322Z 8.6%), (2024-05-21T07:28:29.609324Z 6.1%), (2024-05-21T07:28:34.613037Z 5.0%), (2024-05-21T07:28:39.609342Z 4.0%)","availableProcessors":1},"clientCfgs":{"id":1,"machineId":"uuid:4f5fc45b-190c-4ff1-9348-5d8dcd7bd7a3","connectionMode":"DIRECT","numberOfClients":1,"excrgns":"[]","clientEndpoints":{"https://va7prod1contentservicedocdbkqqirnug.documents.azure.com:443":1},"connCfg":{"rntbd":"(cto:PT5S, nrto:PT5S, icto:PT0S, ieto:PT1H, mcpe:130, mrpc:30, cer:true)","gw":"(cps:1000, nrto:PT1M, icto:PT1M, p:false)","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Jun 19, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar @pjohari-ms @TheovanKraay.

@github-actions github-actions bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels Jun 19, 2024
@kushagraThapar
Copy link
Member

@tvaron3 can you please take a look into this!

@tvaron3 tvaron3 linked a pull request Jul 8, 2024 that will close this issue
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants