Refresh emulator inactivity timeout on SDK-retried responses (blocked on SDK enhancement)

未關閉
#265 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
csharp
領域
cli

研究方向

Read the shell's OperationProgressHandler implementation and how it is registered with the Cosmos SDK; the issue does not name file paths. First check whether the SDK enhancement Azure/azure-cosmos-dotnet-v3#6178 is available, since this work is explicitly blocked on it. Once available, implement per-attempt timeout refresh while excluding synthesized timeouts, then add a test with repeated 429 responses exceeding the timeout and verify the command completes.

由索引模型根據 Issue 內容生成。

描述

Summary

OperationProgressHandler (added in #264) restarts the local-emulator inactivity timeout whenever the emulator returns a response. It is registered as a Cosmos SDK custom handler, and the SDK places custom handlers before its RetryHandler, so the handler sees only the final response of an operation, not the intermediate responses the SDK retries (for example 429).

Impact

A throttled operation against the local emulator can stay inside the SDK retry loop for longer than the 10-second inactivity limit. With the SDK's default rate-limit policy (up to 9 retries, up to 30 seconds of waiting), the shell can cancel the command and disconnect even though the emulator answered every attempt. Earlier writes remain committed. This only affects local-emulator connections; Azure accounts have no inactivity timeout.

Plan

  1. Request a supported per-attempt response notification from the SDK (Gateway and Direct, without changing custom-handler semantics): Azure/azure-cosmos-dotnet-v3#6178.
  2. Once it ships, use it in the shell to restart the inactivity timeout on each real response, still excluding SDK-synthesized timeouts, so stalled requests keep timing out.
  3. Add a test that simulates repeated 429 responses longer than the timeout and verifies the command completes.

This does not block current releases; integrate it in the first shell release after the SDK change is available.

主要語言
C#
星號
4
分支
7
平均合併
2 天 4 小時
30 天內合併 PR
26

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Azure/CosmosDBShell 的其他 Issue

查看 Azure/CosmosDBShell 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。