From 0534106c037aa38b38112d9ca2c8b2aa02efd698 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Sat, 14 Nov 2026 02:48:30 +0000 Subject: [PATCH 1/2] Clarify Rust activity backoff without an interval maximum --- docs/polyglot/rust.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/polyglot/rust.md b/docs/polyglot/rust.md index 1a45e026f1b..37b0b40187a 100644 --- a/docs/polyglot/rust.md +++ b/docs/polyglot/rust.md @@ -408,6 +408,30 @@ Local failures are bounded before workflow code observes them, including the pub These SDK reporting bounds do not establish a Core derived-summary storage fix, another SDK’s delivery, embedded behavior or Server image adoption. Older workers can still fail to report an oversized failure. See the [published-source policy](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits) and [shared failure guidance](../failures-and-recovery.md#rust-failure-report-limits). +## Activity retry backoff {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` counts total attempts, including the +first. With `exponential_backoff(initial, coefficient, maximum_interval)`, +passing `None` selects no interval cap. Pass `Some(maximum)` to cap the +intervals explicitly. The default policy remains one attempt with an empty +backoff list. + +For nine total attempts, an initial one-second delay, coefficient two and +`None` encode `1, 2, 4, 8, 16, 32, 64, 128` seconds for the eight retries. +The finite attempt budget and original schedule-to-close deadline, when +configured, still bound retries. Arithmetic or protocol overflow returns +`ActivityOptionsErrorKind::BackoffOverflow` during validation. + +Replay preserves the complete recorded delay list and compares it and the +other known policy fields exactly. Changing only the maximum is compatible +when the encoded list stays identical. A maximum that changes the list is a +policy change, even if a changed entry was unused. Adding a 60-second cap to +the example changes its list and can refuse replay with +`activity_retry_policy_mismatch`. + +See the [Rust retry policy recipe](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +and the published [ActivityRetryPolicy API](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff). + ## Local activities Rust SDK 3.1.0 adds inline local execution on workers configured with From c93edec53966d3c38e86497947bec3a8d3eb653d Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Sat, 14 Nov 2026 02:53:51 +0000 Subject: [PATCH 2/2] Translate Rust retry interval clarification in all locales --- .../current/polyglot/rust.md | 26 +++++++++++++++++++ i18n/de/source-hashes.json | 2 +- .../current/polyglot/rust.md | 26 +++++++++++++++++++ i18n/es/source-hashes.json | 2 +- .../current/polyglot/rust.md | 25 ++++++++++++++++++ i18n/fr/source-hashes.json | 2 +- .../current/polyglot/rust.md | 23 ++++++++++++++++ i18n/ja/source-hashes.json | 2 +- .../current/polyglot/rust.md | 25 ++++++++++++++++++ i18n/pt-BR/source-hashes.json | 2 +- .../current/polyglot/rust.md | 25 ++++++++++++++++++ i18n/uk/source-hashes.json | 2 +- .../current/polyglot/rust.md | 20 ++++++++++++++ i18n/zh-Hans/source-hashes.json | 2 +- 14 files changed, 177 insertions(+), 7 deletions(-) diff --git a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/rust.md b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/rust.md index 82c35fc97ad..2b3afed2bdc 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -394,6 +394,32 @@ Lokale Fehler werden vor der Beobachtung durch Workflow-Code begrenzt, einschlie Diese SDK-Grenzen belegen keine Core-Korrektur abgeleiteter Zusammenfassungen, Lieferung anderer SDKs, Embedded-Verhalten oder Server-Image-Übernahme. Ältere Worker können übergroße Fehler weiterhin nicht melden. Siehe die [Richtlinie im veröffentlichten Source](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits) und den [gemeinsamen Leitfaden](../failures-and-recovery.md#rust-failure-report-limits). +## Backoff für Aktivitätswiederholungen {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` zählt alle Versuche einschließlich +des ersten. Bei `exponential_backoff(initial, coefficient, maximum_interval)` +wählt `None` keine Intervallobergrenze. Übergeben Sie `Some(maximum)`, um +die Intervalle ausdrücklich zu begrenzen. Die Standardrichtlinie bleibt +ein Versuch mit einer leeren Backoff-Liste. + +Bei neun Versuchen insgesamt, einer anfänglichen Verzögerung von einer +Sekunde, dem Koeffizienten zwei und `None` werden für die acht Wiederholungen +`1, 2, 4, 8, 16, 32, 64, 128` Sekunden codiert. Das endliche Versuchslimit +und die ursprüngliche Schedule-to-close-Frist, sofern konfiguriert, begrenzen +Wiederholungen weiterhin. Arithmetischer Überlauf oder Protokollüberlauf +liefert bei der Validierung `ActivityOptionsErrorKind::BackoffOverflow`. + +Replay bewahrt die vollständige aufgezeichnete Verzögerungsliste und vergleicht +sie und die anderen bekannten Richtlinienfelder exakt. Nur die Obergrenze +zu ändern ist kompatibel, wenn die codierte Liste identisch bleibt. Ändert +eine Obergrenze die Liste, ändert sich die Richtlinie, selbst wenn ein +geänderter Eintrag ungenutzt war. Eine Obergrenze von 60 Sekunden verändert +die Liste im Beispiel. Dadurch kann Replay mit `activity_retry_policy_mismatch` +zurückgewiesen werden. + +Siehe das [Rust-Beispiel für Wiederholungsrichtlinien](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +und die veröffentlichte [ActivityRetryPolicy-API](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff). + ## Lokale Aktivitäten {#local-activities} Rust SDK 3.1.0 ergänzt lokale Inline-Ausführung auf Workern mit diff --git a/i18n/de/source-hashes.json b/i18n/de/source-hashes.json index 045eb71aa6f..a6ad7cb1019 100644 --- a/i18n/de/source-hashes.json +++ b/i18n/de/source-hashes.json @@ -87,7 +87,7 @@ "polyglot/python.md": "57734052d6ffae8d660083626bf47fb7c392c492ab0581a8942401046bb25d38", "polyglot/runtime-migration.md": "5a78713bb8cb74aea58f6d5d826400d968a405f69c6ff17fdf2f7decb1d14b71", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "31950634b8ccdb5c288ba871cc7f816de6683c52bf738bfdc13fa7aa825c6335", + "polyglot/rust.md": "602f61be5ec561f27845d4ca0657d71c8f6cc3f08e30d1f657bd62c23dc53314", "polyglot/server-api-reference.md": "ecd6d358d6e5bde442ebf0e1ec8a072779089e2a5c4427e31eef646f42c6c03c", "polyglot/server-config-reference.md": "aec241c0046f12a9d6efe2d6c1de443d7753bdf34135e06a6f83b3904ed1d429", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/rust.md b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/rust.md index 00faa8a3a4a..3109316992b 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -342,6 +342,32 @@ Los fallos locales se acotan antes de que los observe el workflow, incluida la n Estos límites SDK no demuestran una corrección del almacenamiento de resúmenes de Core, entrega de otro SDK, comportamiento embedded ni adopción en imágenes Server. Los workers antiguos aún pueden no reportar un fallo excesivo. Consulta la [política en el source publicado](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits) y la [guía común](../failures-and-recovery.md#rust-failure-report-limits). +## Backoff de reintentos de actividades {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` cuenta los intentos totales, incluido +el primero. Con `exponential_backoff(initial, coefficient, maximum_interval)`, +pasar `None` no establece un límite de intervalo. Pase `Some(maximum)` para +limitar los intervalos explícitamente. La política predeterminada sigue +siendo un intento con una lista de backoff vacía. + +Para nueve intentos totales, una demora inicial de un segundo, coeficiente +dos y `None` codifican `1, 2, 4, 8, 16, 32, 64, 128` segundos para los ocho +reintentos. El presupuesto finito de intentos y el plazo original de +schedule-to-close, cuando está configurado, siguen limitando los reintentos. +Un desbordamiento aritmético o del protocolo devuelve +`ActivityOptionsErrorKind::BackoffOverflow` durante la validación. + +La reproducción conserva la lista completa de demoras registrada y la +compara, junto con los demás campos conocidos de la política, de forma +exacta. Cambiar solo el máximo es compatible si la lista codificada sigue +siendo idéntica. Un máximo que cambia la lista cambia la política, aunque +la entrada modificada no se haya usado. Añadir un límite de 60 segundos al +ejemplo cambia su lista y puede rechazar la reproducción con +`activity_retry_policy_mismatch`. + +Consulte la [receta de políticas de reintento de Rust](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +y la [API publicada de ActivityRetryPolicy](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff). + ## Actividades locales {#local-activities} El SDK de Rust 3.1.0 añade ejecución local en el propio worker con `Worker::local_activities(true)`. Registra callbacks con los métodos ordinarios de registro de actividades y utiliza los métodos de actividad local del contexto de workflow. Consulta el [ejemplo ejecutable](https://github.com/durable-workflow/sdk-rust/blob/3.1.0/examples/local_activities.rs) y la [referencia de LocalActivityOptions](https://rust.durable-workflow.com/durable_workflow/struct.LocalActivityOptions.html) para configurar reintentos y tiempos de espera. diff --git a/i18n/es/source-hashes.json b/i18n/es/source-hashes.json index 045eb71aa6f..a6ad7cb1019 100644 --- a/i18n/es/source-hashes.json +++ b/i18n/es/source-hashes.json @@ -87,7 +87,7 @@ "polyglot/python.md": "57734052d6ffae8d660083626bf47fb7c392c492ab0581a8942401046bb25d38", "polyglot/runtime-migration.md": "5a78713bb8cb74aea58f6d5d826400d968a405f69c6ff17fdf2f7decb1d14b71", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "31950634b8ccdb5c288ba871cc7f816de6683c52bf738bfdc13fa7aa825c6335", + "polyglot/rust.md": "602f61be5ec561f27845d4ca0657d71c8f6cc3f08e30d1f657bd62c23dc53314", "polyglot/server-api-reference.md": "ecd6d358d6e5bde442ebf0e1ec8a072779089e2a5c4427e31eef646f42c6c03c", "polyglot/server-config-reference.md": "aec241c0046f12a9d6efe2d6c1de443d7753bdf34135e06a6f83b3904ed1d429", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/rust.md b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/rust.md index 77ea9e717de..e9b7735551e 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -400,6 +400,31 @@ Les échecs locaux sont bornés avant leur observation par le workflow, normalis Ces limites SDK ne prouvent pas une correction du stockage des résumés Core, la livraison d’un autre SDK, le mode embedded ou l’adoption dans une image Server. Les anciens workers peuvent encore ne pas transmettre un échec excessif. Voir la [politique du source publié](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits) et le [guide commun](../failures-and-recovery.md#rust-failure-report-limits). +## Backoff des nouvelles tentatives d’activité {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` compte toutes les tentatives, y compris +la première. Avec `exponential_backoff(initial, coefficient, maximum_interval)`, +passer `None` ne fixe aucun plafond d’intervalle. Passez `Some(maximum)` pour +plafonner explicitement les intervalles. La politique par défaut reste une +tentative avec une liste de backoff vide. + +Pour neuf tentatives au total, un délai initial d’une seconde, un coefficient +de deux et `None` encodent `1, 2, 4, 8, 16, 32, 64, 128` secondes pour les +huit nouvelles tentatives. Le budget fini de tentatives et l’échéance +schedule-to-close d’origine, lorsqu’elle est configurée, continuent de limiter +les nouvelles tentatives. Un dépassement arithmétique ou de la plage du +protocole renvoie `ActivityOptionsErrorKind::BackoffOverflow` à la validation. + +La relecture conserve la liste complète des délais enregistrés et la compare +exactement, avec les autres champs connus de la politique. Modifier seulement +le maximum reste compatible si la liste encodée demeure identique. Un maximum +qui change cette liste change la politique, même si l’entrée modifiée n’a pas +été utilisée. Ajouter un plafond de 60 secondes à l’exemple change sa liste +et peut entraîner un refus de la relecture avec `activity_retry_policy_mismatch`. + +Consultez la [recette Rust des politiques de nouvelle tentative](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +et l’[API ActivityRetryPolicy publiée](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff). + ## Activités locales {#local-activities} Le SDK Rust 3.1.0 ajoute l’exécution locale en ligne sur les workers configurés diff --git a/i18n/fr/source-hashes.json b/i18n/fr/source-hashes.json index 045eb71aa6f..a6ad7cb1019 100644 --- a/i18n/fr/source-hashes.json +++ b/i18n/fr/source-hashes.json @@ -87,7 +87,7 @@ "polyglot/python.md": "57734052d6ffae8d660083626bf47fb7c392c492ab0581a8942401046bb25d38", "polyglot/runtime-migration.md": "5a78713bb8cb74aea58f6d5d826400d968a405f69c6ff17fdf2f7decb1d14b71", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "31950634b8ccdb5c288ba871cc7f816de6683c52bf738bfdc13fa7aa825c6335", + "polyglot/rust.md": "602f61be5ec561f27845d4ca0657d71c8f6cc3f08e30d1f657bd62c23dc53314", "polyglot/server-api-reference.md": "ecd6d358d6e5bde442ebf0e1ec8a072779089e2a5c4427e31eef646f42c6c03c", "polyglot/server-config-reference.md": "aec241c0046f12a9d6efe2d6c1de443d7753bdf34135e06a6f83b3904ed1d429", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/rust.md b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/rust.md index 12950e94741..959d6c38154 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -332,6 +332,29 @@ pub fn register_charge(worker: &mut Worker) { この SDK 上限は、Core の派生 summary 保存修正、他 SDK、embedded 動作、Server イメージ採用の提供を証明しません。旧 worker では大きすぎる失敗を報告できない場合があります。[公開 source の方針](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits)と[共通の失敗ガイド](../failures-and-recovery.md#rust-failure-report-limits)を参照してください。 +## アクティビティ再試行のバックオフ {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` は、最初の試行を含む総試行回数を数えます。 +`exponential_backoff(initial, coefficient, maximum_interval)` に `None` を渡すと、 +待機間隔の上限は設定されません。明示的に上限を設けるには `Some(maximum)` を +渡してください。既定のポリシーは、試行 1 回と空のバックオフリストのままです。 + +総試行回数が 9 回、初期待機時間が 1 秒、係数が 2、上限が `None` の場合、8 回の +再試行に対して `1, 2, 4, 8, 16, 32, 64, 128` 秒をエンコードします。有限の試行回数と、 +設定されている場合は元の schedule-to-close 期限が、引き続き再試行を制限します。 +算術オーバーフローまたはプロトコルの範囲を超える値は、検証時に +`ActivityOptionsErrorKind::BackoffOverflow` を返します。 + +リプレイは記録済みの待機時間リスト全体を保持し、他の既知のポリシーフィールドと +ともに厳密に比較します。最大値だけを変更する場合、エンコードされたリストが同一なら +互換性があります。最大値によってリストが変わる場合、変更した要素が未使用でも +ポリシー変更になります。この例に 60 秒の上限を追加するとリストが変わり、 +`activity_retry_policy_mismatch` でリプレイを拒否することがあります。 + +[Rust の再試行ポリシーのレシピ](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +と、公開済みの [ActivityRetryPolicy API](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff) +を参照してください。 + ## ローカルアクティビティ {#local-activities} Rust SDK 3.1.0 は `Worker::local_activities(true)` で設定した Worker にインラインのローカル実行を追加します。通常のアクティビティ登録メソッドでコールバックを登録し、ワークフローコンテキストのローカルアクティビティメソッドを使います。再試行とタイムアウトの設定は[実行可能な例](https://github.com/durable-workflow/sdk-rust/blob/3.1.0/examples/local_activities.rs)と [LocalActivityOptions リファレンス](https://rust.durable-workflow.com/durable_workflow/struct.LocalActivityOptions.html)を参照してください。 diff --git a/i18n/ja/source-hashes.json b/i18n/ja/source-hashes.json index 045eb71aa6f..a6ad7cb1019 100644 --- a/i18n/ja/source-hashes.json +++ b/i18n/ja/source-hashes.json @@ -87,7 +87,7 @@ "polyglot/python.md": "57734052d6ffae8d660083626bf47fb7c392c492ab0581a8942401046bb25d38", "polyglot/runtime-migration.md": "5a78713bb8cb74aea58f6d5d826400d968a405f69c6ff17fdf2f7decb1d14b71", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "31950634b8ccdb5c288ba871cc7f816de6683c52bf738bfdc13fa7aa825c6335", + "polyglot/rust.md": "602f61be5ec561f27845d4ca0657d71c8f6cc3f08e30d1f657bd62c23dc53314", "polyglot/server-api-reference.md": "ecd6d358d6e5bde442ebf0e1ec8a072779089e2a5c4427e31eef646f42c6c03c", "polyglot/server-config-reference.md": "aec241c0046f12a9d6efe2d6c1de443d7753bdf34135e06a6f83b3904ed1d429", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/rust.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/rust.md index c3d8da26bff..aeb5f871bb4 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -392,6 +392,31 @@ Falhas locais são limitadas antes da observação pelo workflow, incluindo a no Estes limites SDK não comprovam correção de armazenamento de resumo Core, entrega de outro SDK, comportamento embedded ou adoção em imagem Server. Workers antigos ainda podem não enviar uma falha excessiva. Veja a [política no source publicado](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits) e a [orientação comum](../failures-and-recovery.md#rust-failure-report-limits). +## Backoff de novas tentativas de atividade {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` conta todas as tentativas, incluindo +a primeira. Com `exponential_backoff(initial, coefficient, maximum_interval)`, +passar `None` não define um limite de intervalo. Passe `Some(maximum)` para +limitar os intervalos explicitamente. A política padrão continua sendo uma +tentativa com uma lista de backoff vazia. + +Para nove tentativas no total, um atraso inicial de um segundo, coeficiente +dois e `None` codificam `1, 2, 4, 8, 16, 32, 64, 128` segundos para as oito +novas tentativas. O orçamento finito de tentativas e o prazo original de +schedule-to-close, quando configurado, continuam limitando as tentativas. +Um estouro aritmético ou dos limites do protocolo retorna +`ActivityOptionsErrorKind::BackoffOverflow` durante a validação. + +O replay preserva a lista completa de atrasos registrada e a compara +exatamente, junto com os outros campos conhecidos da política. Alterar apenas +o máximo é compatível se a lista codificada continuar idêntica. Um máximo +que muda a lista muda a política, mesmo que a entrada alterada não tenha +sido usada. Adicionar um limite de 60 segundos ao exemplo muda sua lista +e pode levar à recusa do replay com `activity_retry_policy_mismatch`. + +Veja a [receita Rust de políticas de nova tentativa](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +e a [API publicada de ActivityRetryPolicy](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff). + ## Atividades locais {#local-activities} O SDK Rust 3.1.0 adiciona execução local inline em workers configurados com diff --git a/i18n/pt-BR/source-hashes.json b/i18n/pt-BR/source-hashes.json index 045eb71aa6f..a6ad7cb1019 100644 --- a/i18n/pt-BR/source-hashes.json +++ b/i18n/pt-BR/source-hashes.json @@ -87,7 +87,7 @@ "polyglot/python.md": "57734052d6ffae8d660083626bf47fb7c392c492ab0581a8942401046bb25d38", "polyglot/runtime-migration.md": "5a78713bb8cb74aea58f6d5d826400d968a405f69c6ff17fdf2f7decb1d14b71", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "31950634b8ccdb5c288ba871cc7f816de6683c52bf738bfdc13fa7aa825c6335", + "polyglot/rust.md": "602f61be5ec561f27845d4ca0657d71c8f6cc3f08e30d1f657bd62c23dc53314", "polyglot/server-api-reference.md": "ecd6d358d6e5bde442ebf0e1ec8a072779089e2a5c4427e31eef646f42c6c03c", "polyglot/server-config-reference.md": "aec241c0046f12a9d6efe2d6c1de443d7753bdf34135e06a6f83b3904ed1d429", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/rust.md b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/rust.md index dce817ab2cd..9acb3968f73 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -392,6 +392,31 @@ pub fn register_charge(worker: &mut Worker) { Ці SDK-межі не доводять виправлення похідного summary-сховища Core, доставку іншого SDK, embedded-поведінку чи оновлення образу Server. Старіші worker усе ще можуть не надіслати завелику помилку. Див. [політику опублікованого source](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits) та [спільний довідник помилок](../failures-and-recovery.md#rust-failure-report-limits). +## Затримки повторних спроб activity {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` рахує загальну кількість спроб разом +із першою. У `exponential_backoff(initial, coefficient, maximum_interval)` +значення `None` не задає верхньої межі інтервалу. Передайте `Some(maximum)`, +щоб явно обмежити інтервали. Типова політика передбачає одну спробу +з порожнім списком затримок. + +Для дев’яти спроб загалом початкова затримка в одну секунду, коефіцієнт два +та `None` кодують `1, 2, 4, 8, 16, 32, 64, 128` секунд для восьми повторних +спроб. Скінченний бюджет спроб і початковий строк schedule-to-close, якщо +його налаштовано, і далі обмежують повторні спроби. Арифметичне переповнення +або вихід за межі протоколу повертає `ActivityOptionsErrorKind::BackoffOverflow` +під час валідації. + +Replay зберігає весь записаний список затримок і точно порівнює його разом +з іншими відомими полями політики. Зміна лише максимуму сумісна, якщо +закодований список залишається ідентичним. Максимум, що змінює список, +змінює політику, навіть якщо змінений елемент не використовувався. Додавання +межі в 60 секунд до прикладу змінює його список і може спричинити відмову +replay з `activity_retry_policy_mismatch`. + +Див. [приклад політики повторних спроб Rust](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +та опублікований [API ActivityRetryPolicy](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff). + ## Локальні activity {#local-activities} Rust SDK 3.1.0 додає inline local execution на workers із налаштуванням diff --git a/i18n/uk/source-hashes.json b/i18n/uk/source-hashes.json index 045eb71aa6f..a6ad7cb1019 100644 --- a/i18n/uk/source-hashes.json +++ b/i18n/uk/source-hashes.json @@ -87,7 +87,7 @@ "polyglot/python.md": "57734052d6ffae8d660083626bf47fb7c392c492ab0581a8942401046bb25d38", "polyglot/runtime-migration.md": "5a78713bb8cb74aea58f6d5d826400d968a405f69c6ff17fdf2f7decb1d14b71", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "31950634b8ccdb5c288ba871cc7f816de6683c52bf738bfdc13fa7aa825c6335", + "polyglot/rust.md": "602f61be5ec561f27845d4ca0657d71c8f6cc3f08e30d1f657bd62c23dc53314", "polyglot/server-api-reference.md": "ecd6d358d6e5bde442ebf0e1ec8a072779089e2a5c4427e31eef646f42c6c03c", "polyglot/server-config-reference.md": "aec241c0046f12a9d6efe2d6c1de443d7753bdf34135e06a6f83b3904ed1d429", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/rust.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/rust.md index ab57802a6a6..d7676db15d4 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -327,6 +327,26 @@ pub fn register_charge(worker: &mut Worker) { 这些 SDK 限制不能证明 Core 派生 summary 存储已修复、其他 SDK 已交付、embedded 行为已验证或 Server 镜像已采用。旧 worker 仍可能无法报告过大的失败。请参阅[已发布源码策略](https://github.com/durable-workflow/sdk-rust/blob/dd58dd146f1337c3be24ad18fe65e3bb31d78b58/README.md#failure-report-limits)和[共享失败指南](../failures-and-recovery.md#rust-failure-report-limits)。 +## 活动重试退避 {#activity-retry-backoff} + +`ActivityRetryPolicy::new(max_attempts)` 计算包括首次尝试在内的总尝试次数。 +对于 `exponential_backoff(initial, coefficient, maximum_interval)`,传入 `None` +表示不设置间隔上限。请传入 `Some(maximum)` 来显式限制间隔。默认策略仍为一次尝试 +和空的退避列表。 + +总共九次尝试、初始延迟一秒、系数为二并传入 `None` 时,八次重试编码的延迟为 +`1, 2, 4, 8, 16, 32, 64, 128` 秒。有限的尝试次数预算和原始 schedule-to-close +期限(如果已配置)仍然约束重试。算术溢出或超出协议范围会在验证时返回 +`ActivityOptionsErrorKind::BackoffOverflow`。 + +重放保留完整的已记录延迟列表,并将它和其他已知策略字段进行精确比较。仅更改最大值时, +只要编码后的列表保持相同,就仍然兼容。如果最大值改变了列表,即使改变的条目未曾使用, +也是策略变更。为该示例添加 60 秒上限会改变其列表,可能以 +`activity_retry_policy_mismatch` 拒绝重放。 + +请参阅 [Rust 重试策略示例](https://github.com/durable-workflow/sdk-rust/blob/7325699d7f09e57293d66169541d26efdd484f82/README.md#activity-retry-policies) +和已发布的 [ActivityRetryPolicy API](https://rust.durable-workflow.com/durable_workflow/struct.ActivityRetryPolicy.html#method.exponential_backoff)。 + ## 本地活动 {#local-activities} Rust SDK 3.1.0 在配置了 `Worker::local_activities(true)` 的 Worker 上增加内联本地执行。使用普通活动注册方法注册回调,然后使用工作流上下文的本地活动方法。重试和超时配置见[可运行示例](https://github.com/durable-workflow/sdk-rust/blob/3.1.0/examples/local_activities.rs)及 [LocalActivityOptions 参考](https://rust.durable-workflow.com/durable_workflow/struct.LocalActivityOptions.html)。 diff --git a/i18n/zh-Hans/source-hashes.json b/i18n/zh-Hans/source-hashes.json index 045eb71aa6f..a6ad7cb1019 100644 --- a/i18n/zh-Hans/source-hashes.json +++ b/i18n/zh-Hans/source-hashes.json @@ -87,7 +87,7 @@ "polyglot/python.md": "57734052d6ffae8d660083626bf47fb7c392c492ab0581a8942401046bb25d38", "polyglot/runtime-migration.md": "5a78713bb8cb74aea58f6d5d826400d968a405f69c6ff17fdf2f7decb1d14b71", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "31950634b8ccdb5c288ba871cc7f816de6683c52bf738bfdc13fa7aa825c6335", + "polyglot/rust.md": "602f61be5ec561f27845d4ca0657d71c8f6cc3f08e30d1f657bd62c23dc53314", "polyglot/server-api-reference.md": "ecd6d358d6e5bde442ebf0e1ec8a072779089e2a5c4427e31eef646f42c6c03c", "polyglot/server-config-reference.md": "aec241c0046f12a9d6efe2d6c1de443d7753bdf34135e06a6f83b3904ed1d429", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",