[EventHubs] A server-busy rejection tears down the whole connection on every retry
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- cpp
調査の方向性
sdk/eventhubs/azure-messaging-eventhubs/src/private/eventhubs_utilities.hpp の ShouldInvalidateSender から始め、既存の message-size-exceeded の keep-list エントリを確認してください。次に sdk/eventhubs/azure-messaging-eventhubs/test/ut/reattach_policy_test.cpp とその真理値表を調べてください。server-busy 条件で sender が維持され、更新された reattach policy テストがパスすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
A com.microsoft:server-busy rejection discards the cached sender, the session, and the connection for the partition. So every retry of a throttled send pays a full TCP, TLS, SASL, CBS, and attach round trip, at the moment when the service asked for less load.
Motivation
ShouldInvalidateSender keeps the cached sender for one condition only, amqp:link:message-size-exceeded (sdk/eventhubs/azure-messaging-eventhubs/src/private/eventhubs_utilities.hpp:111-114). Every other condition returns true.
ProducerClient::Send calls that helper in its catch block, and a true result calls InvalidateSender (sdk/eventhubs/azure-messaging-eventhubs/src/producer_client.cpp:200-207). InvalidateSender closes and removes the sender, the session, and the connection for that partition id, so the next attempt builds all three again.
AmqpErrorCondition::ServerBusyError holds the value com.microsoft:server-busy (sdk/core/azure-core-amqp/src/models/amqp_error.cpp:152; the declaration is at sdk/core/azure-core-amqp/inc/azure/core/amqp/internal/models/amqp_error.hpp:175). EventHubsExceptionFactory::IsErrorTransient lists that condition as transient (sdk/eventhubs/azure-messaging-eventhubs/src/eventhubs_utilities.cpp:133-145), so RetryOperation::Execute retries the send.
The service reports this condition on the disposition of the transfer, and it keeps the link attached. That reply arrives on the same path as the message size rejection: the uAMQP sender maps a rejected delivery state to MessageSendStatus::Error and it gives the AMQP error back in the send tuple (sdk/core/azure-core-amqp/src/impl/uamqp/amqp/message_sender.cpp:507-523), and Send turns that tuple into an EventHubsException (sdk/eventhubs/azure-messaging-eventhubs/src/producer_client.cpp:177-185). The message size case is already on the keep list for exactly this reason. The server busy case has the same shape and is not on the list.
The .NET producer keeps its link in a FaultTolerantAmqpObject<SendingAmqpLink> and it builds a new link when that object faults (AmqpProducer.cs). A rejected disposition does not fault the link object, so .NET keeps the link and retries the transfer on it.
This behaviour became visible with #7328, which is the link reattach part of #7254. Before that change, a failed send left the cached sender in place.
Proposal
Add AmqpErrorCondition::ServerBusyError to the keep list in ShouldInvalidateSender, next to amqp:link:message-size-exceeded. Compare against the constant, and not against a literal string, so the two spellings cannot drift apart.
Extend the truth table in sdk/eventhubs/azure-messaging-eventhubs/test/ut/reattach_policy_test.cpp with a com.microsoft:server-busy row that asserts that the sender stays.
Note that the server busy delay is a separate item in #7254, and it stays out of scope here. This change covers the link only.
- 主要言語
- C++
- スター
- 207
- フォーク
- 173
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 30
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/azure-sdk-for-cpp のほかの issue
-
customer-reported needs-triage question
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/azure-sdk-for-cpp#7435 ·
メンテナーはふだん 1 日以内に返信
-
bug EngSys
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Azure/azure-sdk-for-cpp#7362 ·
メンテナーはふだん 1 日以内に返信
-
Client needs-team-attention Service Attention Storage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Azure/azure-sdk-for-cpp#7347 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
DataLakeDirectoryClient::ListPaths() throws exception due to incorrect format used for date-time fields対応中かも @seanmcc-msft が今日担当しました。 オープンcustomer-reported needs-triage question
Azure/azure-sdk-for-cpp#7436 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Azure.Core bug test-enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
Azure/azure-sdk-for-cpp#7401 ·
メンテナーはふだん 1 日以内に返信
Azure/azure-sdk-for-cpp の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
lxqt/qtermwidget#688 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
cpinitiative/usaco-guide#6665 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mpfaffenberger/privateer_reimagined#658 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
microsoft/onnxruntime#33018 ·
メンテナーはふだん 2 日以内に返信
-
Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信