diff --git a/docs/failures-and-recovery.md b/docs/failures-and-recovery.md index ea4e72ca18a..bec8e1eed4f 100644 --- a/docs/failures-and-recovery.md +++ b/docs/failures-and-recovery.md @@ -270,6 +270,10 @@ class RetryableWorkflow extends Workflow } ``` +## Rust service-mode failure report limits {#rust-failure-report-limits} + +For service-mode workers actually running Rust SDK **4.10.1 or newer**, outgoing failure messages are at most 62 KiB UTF-8 including marker, stacks 128 KiB where supported, combined serialized optional metadata 64 KiB, and the full encoded body 1 MiB or a lower known transport cap. Original type, retry decision and claim identity stay intact; impossible mandatory envelopes refuse explicitly. The [Rust reporting guide](./polyglot/rust.md#bounded-failure-reports) explains omission markers, whole Avro details and local-result boundaries. These limits do not qualify old SDKs, embedded mode or the separate Core summary-storage correction. + ## Related Guides - [Execution Guarantees and Idempotency](./constraints/execution-guarantees.md) diff --git a/docs/polyglot/rust.md b/docs/polyglot/rust.md index 370ece39f78..fc72c5f91de 100644 --- a/docs/polyglot/rust.md +++ b/docs/polyglot/rust.md @@ -320,6 +320,27 @@ A stable key makes duplicate effects preventable only when the downstream system See [ActivityContext identity accessors](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id) and the [normal installed 4.9.0 receipt](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500) for ordinary/cooperative, local and worker-session controls. See [execution guarantees](../constraints/execution-guarantees.md#service-activity-identity) for the shared idempotency contract. +## Bounded failure reports {#bounded-failure-reports} + +These reporting limits require an actually installed **Rust SDK 4.10.1 or newer**. Check the worker’s `Cargo.lock`; a newer client or source checkout does not update an older selected worker. The limits apply to outgoing failure reporting, not incoming history or unrelated business payloads. + +| Field or envelope | Maximum | +| --- | --- | +| UTF-8 message, including its marker | 62 KiB | +| Stack where supported | 128 KiB | +| Combined serialized optional details, diagnostics and metadata | 64 KiB | +| Complete encoded failure request body | 1 MiB | + +The effective message cap reserves 2 KiB below the original 64 KiB budget for published Server timeline prefixes. JSON escaping, truncation markers, claim identity and all other fields count toward the encoded body. A lower known transport cap can reduce these maxima further. Small reports retain their original content. + +Oversized text carries a visible marker. Existing `diagnostics.sdk_failure_truncation`, where the schema supports it, records original byte sizes and omitted fields. Workflow/query-task schemas without diagnostics and plain command messages carry those statistics in the message marker. Avro details remain a complete valid envelope/runtime reference or are omitted whole and marked; base 64 is never cut into a corrupt value. + +The original exception type, retry decision and required claim identity are preserved. Low-level consumers can use `Client::fail_activity_task_with_failure` and `Client::fail_workflow_task_with_failure` with the published failure schema. `Error::FailureReporting` explicitly refuses a report whose mandatory data cannot fit; it does not decide the application’s retry outcome or fabricate a smaller identity. + +Local failures are bounded before workflow code observes them, including the published Server’s whitespace/NUL normalization. The final request check does not rewrite an already observed local message or another business payload; reporting refuses if those fixed inputs cannot fit. + +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). + ## Local activities Rust SDK 3.1.0 adds inline local execution on workers configured with diff --git a/i18n/de/docusaurus-plugin-content-docs/current/failures-and-recovery.md b/i18n/de/docusaurus-plugin-content-docs/current/failures-and-recovery.md index aa60dad92d9..765ac156e07 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/failures-and-recovery.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/failures-and-recovery.md @@ -263,6 +263,10 @@ class RetryableWorkflow extends Workflow } ``` +## Grenzen für Rust-Fehlerberichte im Service-Modus {#rust-failure-report-limits} + +Bei Service-Workern mit tatsächlich laufendem Rust SDK **4.10.1 oder neuer** hat die ausgehende UTF-8-Nachricht höchstens 62 KiB einschließlich Markierung, ein unterstützter Stack 128 KiB, gemeinsam serialisierte optionale Metadaten 64 KiB und der vollständige kodierte Body 1 MiB oder eine bekannte niedrigere Transportgrenze. Typ, Retry-Entscheidung und Identität bleiben erhalten; unmögliche Pflichthüllen werden ausdrücklich abgelehnt. Der [Rust-Leitfaden](./polyglot/rust.md#bounded-failure-reports) erklärt Markierungen, vollständige Avro-Details und lokale Ergebnisse. Ältere SDKs, Embedded-Modus und die separate Core-Speicherkorrektur sind damit nicht qualifiziert. + ## Weitere Leitfäden {#related-guides} - [Ausführungsgarantien und Idempotenz](./constraints/execution-guarantees.md) erklärt Replay, Wiederholungsversuche, Lease-Ablauf und erneute Zustellung. 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 7974d1cf57b..29a0533b968 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -320,6 +320,27 @@ Ein stabiler Schlüssel ermöglicht die Vermeidung doppelter Effekte nur, wenn d Siehe die [Identitätsmethoden von ActivityContext](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id) und die [Prüfung der normalen Installation 4.9.0](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500) mit Ordinary-/Cooperative-, Local- und Worker-Session-Kontrollen. Der gemeinsame Vertrag steht unter [Ausführungsgarantien](../constraints/execution-guarantees.md#service-activity-identity). +## Begrenzte Fehlerberichte {#bounded-failure-reports} + +Diese Grenzen benötigen **tatsächlich installiertes Rust SDK 4.10.1 oder neuer**. Prüfen Sie die `Cargo.lock` des Workers: Ein neuer Client oder Quellcheckout aktualisiert keinen älteren Worker. Die Grenzen gelten für ausgehende Fehlerberichte, nicht für eingehende Historie oder andere fachliche Payloads. + +| Feld oder Hülle | Maximum | +| --- | --- | +| UTF-8-Nachricht einschließlich Markierung | 62 KiB | +| Stack, sofern unterstützt | 128 KiB | +| Gemeinsam serialisierte optionale Details, Diagnostics und Metadaten | 64 KiB | +| Vollständiger kodierter Fehleranfrage-Body | 1 MiB | + +Die effektive Nachrichtengrenze reserviert 2 KiB unter dem ursprünglichen 64-KiB-Budget für Timeline-Präfixe veröffentlichter Server. JSON-Escaping, Markierungen, Claim-Identität und alle weiteren Felder zählen zum kodierten Body. Eine bekannte niedrigere Transportgrenze kann die Maxima weiter senken. Kleine Berichte behalten den ursprünglichen Inhalt. + +Zu großer Text trägt eine sichtbare Markierung. Das vorhandene `diagnostics.sdk_failure_truncation` hält, sofern vom Schema unterstützt, ursprüngliche Bytezahlen und ausgelassene Felder fest. Workflow-/Query-Task-Schemas ohne Diagnostics und einfache Befehlsnachrichten tragen die Statistik in der Nachrichtenmarkierung. Avro-Details bleiben vollständige gültige Hüllen/Runtime-Referenzen oder werden ganz ausgelassen und markiert; Base 64 wird nie zu einem beschädigten Wert abgeschnitten. + +Ursprünglicher Ausnahmetyp, Retry-Entscheidung und erforderliche Claim-Identität bleiben erhalten. Low-Level-Consumer können `Client::fail_activity_task_with_failure` und `Client::fail_workflow_task_with_failure` mit dem veröffentlichten Fehlerschema nutzen. `Error::FailureReporting` lehnt einen Bericht ausdrücklich ab, wenn Pflichtdaten nicht hineinpassen; er entscheidet keinen fachlichen Retry und erfindet keine kürzere Identität. + +Lokale Fehler werden vor der Beobachtung durch Workflow-Code begrenzt, einschließlich der Leerzeichen-/NUL-Normalisierung des veröffentlichten Servers. Die Endprüfung schreibt weder bereits beobachtete lokale Nachrichten noch andere fachliche Payloads um; passen feste Eingaben nicht hinein, wird abgelehnt. + +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). + ## 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 47391867d2d..5f2cf249aab 100644 --- a/i18n/de/source-hashes.json +++ b/i18n/de/source-hashes.json @@ -28,7 +28,7 @@ "defining-workflows/workflow-status.md": "8e8cb27ff44c890d489d89bf166375acfdfaecabd990a2235e106fab1592d529", "defining-workflows/workflows.md": "f467bc73de32aa5d722c61ce085065460382ae7dd44cea4625847d9fcdc4c97c", "deployment.md": "dd0b6bd184eda12e67922121a09c7f3c98346bde01be1d4c3217f168db5fd7ca", - "failures-and-recovery.md": "318f0cc183d26539c7d5b6bdf791429bb874b793b81cff4c6094ef1d11a796b2", + "failures-and-recovery.md": "7df0b7ce4139b789d8988ce2bf640c388225daa28731b88719e4777f61e40a4c", "features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082", "features/cancel-and-terminate.md": "c678fc7a0c9b11f0e1bee295aff259de9803219c0aa6769fb801622799e7deb1", "features/child-workflows.md": "57016591fb8816aed7b077e204f1c80f9c6a8dff7501bc00a141c41a4607306b", @@ -84,7 +84,7 @@ "polyglot/prerelease-history-migration.md": "a57f05f492228a8a67791f9152648a1e5f80856325b78777cf63b6ef49b7413c", "polyglot/python.md": "d55056ca7638df07b7267bc6d62e635b954957b99620478e861df90558860df3", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "5ff66bcb7e5369bcffd8611342a35c27028cac5a4ee376e86d90334a2b12d365", + "polyglot/rust.md": "af91b22c93a7fe6833df156371d99bb105740684915bc73af4576f6de2897e10", "polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83", "polyglot/server-config-reference.md": "b2dc3ddd188b078875cb46bf32b94053d89912c063c1687cc98ff5ba2baba812", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/es/docusaurus-plugin-content-docs/current/failures-and-recovery.md b/i18n/es/docusaurus-plugin-content-docs/current/failures-and-recovery.md index 6228eaf7cd1..da324f3757a 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/failures-and-recovery.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/failures-and-recovery.md @@ -320,6 +320,10 @@ class RetryableWorkflow extends Workflow } ``` +## Límites de informes de fallo Rust en modo servicio {#rust-failure-report-limits} + +En workers de servicio que realmente ejecutan Rust SDK **4.10.1 o posterior**, el mensaje saliente admite hasta 62 KiB UTF-8 con marcador, stack 128 KiB si existe, metadata opcional serializada combinada 64 KiB y cuerpo completo codificado 1 MiB o un límite de transporte conocido menor. Se conservan tipo, retry e identidad; un envelope obligatorio imposible se rechaza. La [guía Rust](./polyglot/rust.md#bounded-failure-reports) explica marcadores, details Avro íntegros y resultados locales. No cualifica SDK antiguos, modo embedded ni la corrección separada del almacenamiento de resúmenes Core. + ## Guías relacionadas {#related-guides} - [Garantías de ejecución e idempotencia](./constraints/execution-guarantees.md): 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 ff0fcd10848..01523f20a02 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -267,6 +267,27 @@ Una clave estable solo permite evitar efectos duplicados si el sistema externo r Consulta los [métodos de identidad de ActivityContext](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id) y la [verificación de instalación normal 4.9.0](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500) con controles ordinary/cooperative, locales y de sesiones de worker. El contrato común está en [garantías de ejecución](../constraints/execution-guarantees.md#service-activity-identity). +## Informes de fallo con límites {#bounded-failure-reports} + +Estos límites exigen **Rust SDK 4.10.1 o posterior realmente instalado**. Comprueba el `Cargo.lock` del worker: un cliente nuevo o checkout no actualiza un worker antiguo. Se aplican a informes salientes, no al historial recibido ni a payloads de negocio ajenos. + +| Campo o envelope | Máximo | +| --- | --- | +| Mensaje UTF-8, incluido su marcador | 62 KiB | +| Stack cuando está soportado | 128 KiB | +| Total serializado de details, diagnostics y metadata opcionales | 64 KiB | +| Cuerpo completo codificado de la petición de fallo | 1 MiB | + +El límite efectivo reserva 2 KiB del presupuesto original 64 KiB para prefijos del timeline del Server publicado. Escapes JSON, marcadores, identidad del claim y demás campos cuentan en el cuerpo codificado. Un límite de transporte conocido menor puede reducir estos máximos. Los informes pequeños conservan su contenido original. + +El texto excesivo lleva un marcador visible. El campo existente `diagnostics.sdk_failure_truncation`, cuando la estructura lo admite, registra tamaños originales y campos omitidos. Esquemas workflow/query-task sin diagnostics y mensajes simples de comando incluyen esas estadísticas en el marcador. Los details Avro conservan un envelope/referencia runtime completo y válido, o se omiten íntegros con marcador; no se corta base 64 y corrompe el valor. + +Se conservan el tipo original de excepción, la decisión de retry y la identidad obligatoria del claim. Los consumidores de bajo nivel pueden usar `Client::fail_activity_task_with_failure` y `Client::fail_workflow_task_with_failure` con el esquema publicado. `Error::FailureReporting` rechaza explícitamente un informe cuyos datos obligatorios no caben; no decide el retry de la aplicación ni inventa una identidad menor. + +Los fallos locales se acotan antes de que los observe el workflow, incluida la normalización de espacios/NUL del Server publicado. La comprobación final no reescribe mensajes locales ya observados ni otro payload de negocio; rechaza si esos datos fijos no caben. + +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). + ## 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 47391867d2d..5f2cf249aab 100644 --- a/i18n/es/source-hashes.json +++ b/i18n/es/source-hashes.json @@ -28,7 +28,7 @@ "defining-workflows/workflow-status.md": "8e8cb27ff44c890d489d89bf166375acfdfaecabd990a2235e106fab1592d529", "defining-workflows/workflows.md": "f467bc73de32aa5d722c61ce085065460382ae7dd44cea4625847d9fcdc4c97c", "deployment.md": "dd0b6bd184eda12e67922121a09c7f3c98346bde01be1d4c3217f168db5fd7ca", - "failures-and-recovery.md": "318f0cc183d26539c7d5b6bdf791429bb874b793b81cff4c6094ef1d11a796b2", + "failures-and-recovery.md": "7df0b7ce4139b789d8988ce2bf640c388225daa28731b88719e4777f61e40a4c", "features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082", "features/cancel-and-terminate.md": "c678fc7a0c9b11f0e1bee295aff259de9803219c0aa6769fb801622799e7deb1", "features/child-workflows.md": "57016591fb8816aed7b077e204f1c80f9c6a8dff7501bc00a141c41a4607306b", @@ -84,7 +84,7 @@ "polyglot/prerelease-history-migration.md": "a57f05f492228a8a67791f9152648a1e5f80856325b78777cf63b6ef49b7413c", "polyglot/python.md": "d55056ca7638df07b7267bc6d62e635b954957b99620478e861df90558860df3", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "5ff66bcb7e5369bcffd8611342a35c27028cac5a4ee376e86d90334a2b12d365", + "polyglot/rust.md": "af91b22c93a7fe6833df156371d99bb105740684915bc73af4576f6de2897e10", "polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83", "polyglot/server-config-reference.md": "b2dc3ddd188b078875cb46bf32b94053d89912c063c1687cc98ff5ba2baba812", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/failures-and-recovery.md b/i18n/fr/docusaurus-plugin-content-docs/current/failures-and-recovery.md index f6b29feda9b..4c1ed8b891a 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/failures-and-recovery.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/failures-and-recovery.md @@ -353,6 +353,10 @@ class RetryableWorkflow extends Workflow } ``` +## Limites des rapports d’échec Rust en mode service {#rust-failure-report-limits} + +Pour les workers de service exécutant réellement Rust SDK **4.10.1 ou ultérieur**, le message sortant atteint au plus 62 KiB UTF-8 avec marqueur, le stack 128 KiB si pris en charge, les métadonnées facultatives sérialisées combinées 64 KiB et le corps encodé complet 1 MiB ou une limite de transport connue plus basse. Type, retry et identité restent intacts ; une enveloppe obligatoire impossible est refusée. Le [guide Rust](./polyglot/rust.md#bounded-failure-reports) explique marqueurs, details Avro entiers et résultats locaux. Cela ne qualifie pas anciens SDK, mode embedded ou correction séparée du stockage des résumés Core. + ## Guides associés {#related-guides} - Les [garanties d’exécution et l’idempotence](./constraints/execution-guarantees.md) 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 dcaf5dbba72..900632a9f77 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -324,6 +324,27 @@ Une clé stable ne permet d’éviter les effets en double que si le système ex Consultez les [méthodes d’identité d’ActivityContext](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id) et la [vérification d’installation normale 4.9.0](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500) avec les contrôles ordinary/cooperative, locaux et de sessions de worker. Le contrat commun figure dans les [garanties d’exécution](../constraints/execution-guarantees.md#service-activity-identity). +## Rapports d’échec bornés {#bounded-failure-reports} + +Ces limites nécessitent **Rust SDK 4.10.1 ou ultérieur réellement installé**. Vérifiez le `Cargo.lock` du worker : un nouveau client ou checkout ne met pas à jour un ancien worker. Elles concernent les rapports sortants, pas l’historique reçu ni les autres payloads métier. + +| Champ ou enveloppe | Maximum | +| --- | --- | +| Message UTF-8, marqueur compris | 62 KiB | +| Stack lorsque pris en charge | 128 KiB | +| Total sérialisé des details, diagnostics et métadonnées facultatifs | 64 KiB | +| Corps complet encodé de la requête d’échec | 1 MiB | + +La limite effective réserve 2 KiB sous le budget initial 64 KiB pour les préfixes de timeline du Server publié. Échappement JSON, marqueurs, identité du claim et tous les autres champs comptent dans le corps encodé. Une limite de transport connue plus basse peut encore réduire ces maxima. Les petits rapports conservent leur contenu initial. + +Le texte excessif porte un marqueur visible. Le champ existant `diagnostics.sdk_failure_truncation`, lorsque le schéma le permet, indique tailles initiales et champs omis. Les schémas workflow/query-task sans diagnostics et les messages de commande simples portent ces statistiques dans le marqueur. Les details Avro restent une enveloppe/référence runtime complète valide ou sont entièrement omis et marqués ; le base 64 n’est jamais coupé en une valeur corrompue. + +Le type initial d’exception, la décision de retry et l’identité obligatoire du claim sont préservés. Les consommateurs bas niveau peuvent utiliser `Client::fail_activity_task_with_failure` et `Client::fail_workflow_task_with_failure` avec le schéma publié. `Error::FailureReporting` refuse explicitement un rapport dont les données obligatoires ne tiennent pas ; il ne décide pas du retry métier et n’invente pas une identité plus courte. + +Les échecs locaux sont bornés avant leur observation par le workflow, normalisation des espaces/NUL du Server publié comprise. Le contrôle final ne réécrit ni message local déjà observé ni autre payload métier ; il refuse si ces données fixes ne tiennent pas. + +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). + ## 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 47391867d2d..5f2cf249aab 100644 --- a/i18n/fr/source-hashes.json +++ b/i18n/fr/source-hashes.json @@ -28,7 +28,7 @@ "defining-workflows/workflow-status.md": "8e8cb27ff44c890d489d89bf166375acfdfaecabd990a2235e106fab1592d529", "defining-workflows/workflows.md": "f467bc73de32aa5d722c61ce085065460382ae7dd44cea4625847d9fcdc4c97c", "deployment.md": "dd0b6bd184eda12e67922121a09c7f3c98346bde01be1d4c3217f168db5fd7ca", - "failures-and-recovery.md": "318f0cc183d26539c7d5b6bdf791429bb874b793b81cff4c6094ef1d11a796b2", + "failures-and-recovery.md": "7df0b7ce4139b789d8988ce2bf640c388225daa28731b88719e4777f61e40a4c", "features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082", "features/cancel-and-terminate.md": "c678fc7a0c9b11f0e1bee295aff259de9803219c0aa6769fb801622799e7deb1", "features/child-workflows.md": "57016591fb8816aed7b077e204f1c80f9c6a8dff7501bc00a141c41a4607306b", @@ -84,7 +84,7 @@ "polyglot/prerelease-history-migration.md": "a57f05f492228a8a67791f9152648a1e5f80856325b78777cf63b6ef49b7413c", "polyglot/python.md": "d55056ca7638df07b7267bc6d62e635b954957b99620478e861df90558860df3", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "5ff66bcb7e5369bcffd8611342a35c27028cac5a4ee376e86d90334a2b12d365", + "polyglot/rust.md": "af91b22c93a7fe6833df156371d99bb105740684915bc73af4576f6de2897e10", "polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83", "polyglot/server-config-reference.md": "b2dc3ddd188b078875cb46bf32b94053d89912c063c1687cc98ff5ba2baba812", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/failures-and-recovery.md b/i18n/ja/docusaurus-plugin-content-docs/current/failures-and-recovery.md index ae897ea0d50..a0ea9277eb7 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/failures-and-recovery.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/failures-and-recovery.md @@ -261,6 +261,10 @@ class RetryableWorkflow extends Workflow } ``` +## サービスモード Rust の失敗レポート上限 {#rust-failure-report-limits} + +実際に Rust SDK **4.10.1 以降**を動かすサービス worker では、送信 UTF-8 message はマーカー込み62 KiB、対応する stack は128 KiB、任意 metadata の合計シリアライズ結果は64 KiB、完全なエンコード済み body は1 MiBまたはそれより低い既知の輸送上限です。type、retry 判断、claim 識別情報を保ち、必須 envelope が入らなければ明示的に拒否します。[Rust ガイド](./polyglot/rust.md#bounded-failure-reports)に省略マーカー、完全な Avro details、ローカル結果の境界を説明しています。旧 SDK、embedded mode、別の Core summary 保存修正を検証したものではありません。 + ## 関連ガイド {#related-guides} - [実行保証と冪等性](./constraints/execution-guarantees.md) は、このページのすべての復旧経路に関わる、リプレイ、再試行、リース期限切れ、再配信の契約を説明します。 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 9391e73f2a8..9a487848628 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -267,6 +267,27 @@ pub fn register_charge(worker: &mut Worker) { [ActivityContext の識別子メソッド](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id)と、ordinary/cooperative、local、worker-session の検証を含む[通常インストール 4.9.0 の記録](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500)を参照してください。共通の契約は[実行保証](../constraints/execution-guarantees.md#service-activity-identity)にあります。 +## 上限付きの失敗レポート {#bounded-failure-reports} + +この上限には、**実際にインストールされた Rust SDK 4.10.1 以降**が必要です。worker の `Cargo.lock` を確認してください。新しい client や checkout だけでは、旧 worker は更新されません。対象は送信する失敗レポートであり、受信した履歴や他の業務 payload ではありません。 + +| フィールドまたは envelope | 上限 | +| --- | --- | +| マーカーを含む UTF-8 message | 62 KiB | +| サポートされる stack | 128 KiB | +| 任意の details・diagnostics・metadata を合わせたシリアライズ結果 | 64 KiB | +| 失敗リクエストの完全なエンコード済み body | 1 MiB | + +実効 message 上限は、公開 Server の timeline 接頭辞用に元の64 KiBから2 KiBを予約します。JSON escape、マーカー、claim の識別情報、その他すべてのフィールドを body に含めて数えます。既知の輸送上限が低ければ、さらに小さくなります。小さなレポートの元の内容は保持します。 + +大きすぎるテキストには見えるマーカーが付きます。schema が対応する場合、既存の `diagnostics.sdk_failure_truncation` に元のバイト数と省略フィールドを記録します。diagnostics のない workflow/query-task schema や単純な command message では、統計を message のマーカーに含めます。Avro details は完全な有効 envelope/runtime reference のまま残すか、全体を省略してマークします。base64 を途中で切って壊しません。 + +元の例外 type、retry の判断、必須の claim 識別情報は保持します。低レベル consumer は公開された failure schema と `Client::fail_activity_task_with_failure`、`Client::fail_workflow_task_with_failure` を使えます。必須データが入らなければ `Error::FailureReporting` が明示的に拒否します。アプリの retry 結果を決めたり、小さい識別情報を捏造したりはしません。 + +ローカル失敗は、公開 Server の空白/NUL 正規化も含め、workflow コードが観測する前に制限します。最終リクエスト検査では、観測済みのローカル message や別の業務 payload を書き換えません。固定された入力が入らなければ reporting を拒否します。 + +この 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)を参照してください。 + ## ローカルアクティビティ {#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 47391867d2d..5f2cf249aab 100644 --- a/i18n/ja/source-hashes.json +++ b/i18n/ja/source-hashes.json @@ -28,7 +28,7 @@ "defining-workflows/workflow-status.md": "8e8cb27ff44c890d489d89bf166375acfdfaecabd990a2235e106fab1592d529", "defining-workflows/workflows.md": "f467bc73de32aa5d722c61ce085065460382ae7dd44cea4625847d9fcdc4c97c", "deployment.md": "dd0b6bd184eda12e67922121a09c7f3c98346bde01be1d4c3217f168db5fd7ca", - "failures-and-recovery.md": "318f0cc183d26539c7d5b6bdf791429bb874b793b81cff4c6094ef1d11a796b2", + "failures-and-recovery.md": "7df0b7ce4139b789d8988ce2bf640c388225daa28731b88719e4777f61e40a4c", "features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082", "features/cancel-and-terminate.md": "c678fc7a0c9b11f0e1bee295aff259de9803219c0aa6769fb801622799e7deb1", "features/child-workflows.md": "57016591fb8816aed7b077e204f1c80f9c6a8dff7501bc00a141c41a4607306b", @@ -84,7 +84,7 @@ "polyglot/prerelease-history-migration.md": "a57f05f492228a8a67791f9152648a1e5f80856325b78777cf63b6ef49b7413c", "polyglot/python.md": "d55056ca7638df07b7267bc6d62e635b954957b99620478e861df90558860df3", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "5ff66bcb7e5369bcffd8611342a35c27028cac5a4ee376e86d90334a2b12d365", + "polyglot/rust.md": "af91b22c93a7fe6833df156371d99bb105740684915bc73af4576f6de2897e10", "polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83", "polyglot/server-config-reference.md": "b2dc3ddd188b078875cb46bf32b94053d89912c063c1687cc98ff5ba2baba812", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/failures-and-recovery.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/failures-and-recovery.md index 9598d248757..2802a46f38e 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/failures-and-recovery.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/failures-and-recovery.md @@ -338,6 +338,10 @@ class RetryableWorkflow extends Workflow } ``` +## Limites de relatos de falha Rust no modo serviço {#rust-failure-report-limits} + +Em workers de serviço realmente executando Rust SDK **4.10.1 ou posterior**, mensagem enviada tem até 62 KiB UTF-8 com marcador, stack 128 KiB quando suportado, metadata opcional serializada combinada 64 KiB e corpo codificado completo 1 MiB ou limite de transporte conhecido menor. Tipo, retry e identidade permanecem; envelope obrigatório impossível é recusado. A [guia Rust](./polyglot/rust.md#bounded-failure-reports) explica marcadores, details Avro inteiros e resultados locais. Não qualifica SDKs antigos, modo embedded nem a correção separada do armazenamento de resumo Core. + ## Guias relacionados {#related-guides} - [Garantias de execução e idempotência](./constraints/execution-guarantees.md) 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 033e66ee347..4fee3822b15 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 @@ -319,6 +319,27 @@ Uma chave estável só permite impedir efeitos duplicados quando o sistema exter Consulte os [métodos de identidade de ActivityContext](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id) e a [verificação da instalação normal 4.9.0](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500) com controles ordinary/cooperative, locais e de sessões de worker. O contrato compartilhado está em [garantias de execução](../constraints/execution-guarantees.md#service-activity-identity). +## Relatórios de falha com limites {#bounded-failure-reports} + +Estes limites exigem **Rust SDK 4.10.1 ou posterior realmente instalado**. Confira o `Cargo.lock` do worker: cliente novo ou checkout não atualiza worker antigo. Valem para relatos de falha enviados, não para histórico recebido nem outros payloads de negócio. + +| Campo ou envelope | Máximo | +| --- | --- | +| Mensagem UTF-8, incluindo marcador | 62 KiB | +| Stack quando suportado | 128 KiB | +| Total serializado de details, diagnostics e metadata opcionais | 64 KiB | +| Corpo completo codificado da requisição de falha | 1 MiB | + +O limite efetivo reserva 2 KiB dos 64 KiB originais para prefixos do timeline do Server publicado. Escapes JSON, marcadores, identidade do claim e todos os campos contam no corpo codificado. Um limite de transporte conhecido menor pode reduzir os máximos. Relatos pequenos preservam o conteúdo original. + +Texto excessivo recebe marcador visível. O campo existente `diagnostics.sdk_failure_truncation`, quando suportado pelo schema, registra tamanhos originais e campos omitidos. Schemas workflow/query-task sem diagnostics e mensagens simples de comando levam as estatísticas no marcador. Details Avro permanecem envelope/referência runtime completo e válido ou são omitidos inteiros com marcador; base 64 nunca é cortado e corrompido. + +Tipo original da exceção, decisão de retry e identidade obrigatória do claim são preservados. Consumidores de baixo nível podem usar `Client::fail_activity_task_with_failure` e `Client::fail_workflow_task_with_failure` com o schema publicado. `Error::FailureReporting` recusa explicitamente relato cujos dados obrigatórios não cabem; não decide o retry da aplicação nem inventa identidade menor. + +Falhas locais são limitadas antes da observação pelo workflow, incluindo a normalização de espaços/NUL do Server publicado. A verificação final não reescreve mensagem local já observada nem outro payload de negócio; recusa se esses dados fixos não couberem. + +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). + ## 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 47391867d2d..5f2cf249aab 100644 --- a/i18n/pt-BR/source-hashes.json +++ b/i18n/pt-BR/source-hashes.json @@ -28,7 +28,7 @@ "defining-workflows/workflow-status.md": "8e8cb27ff44c890d489d89bf166375acfdfaecabd990a2235e106fab1592d529", "defining-workflows/workflows.md": "f467bc73de32aa5d722c61ce085065460382ae7dd44cea4625847d9fcdc4c97c", "deployment.md": "dd0b6bd184eda12e67922121a09c7f3c98346bde01be1d4c3217f168db5fd7ca", - "failures-and-recovery.md": "318f0cc183d26539c7d5b6bdf791429bb874b793b81cff4c6094ef1d11a796b2", + "failures-and-recovery.md": "7df0b7ce4139b789d8988ce2bf640c388225daa28731b88719e4777f61e40a4c", "features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082", "features/cancel-and-terminate.md": "c678fc7a0c9b11f0e1bee295aff259de9803219c0aa6769fb801622799e7deb1", "features/child-workflows.md": "57016591fb8816aed7b077e204f1c80f9c6a8dff7501bc00a141c41a4607306b", @@ -84,7 +84,7 @@ "polyglot/prerelease-history-migration.md": "a57f05f492228a8a67791f9152648a1e5f80856325b78777cf63b6ef49b7413c", "polyglot/python.md": "d55056ca7638df07b7267bc6d62e635b954957b99620478e861df90558860df3", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "5ff66bcb7e5369bcffd8611342a35c27028cac5a4ee376e86d90334a2b12d365", + "polyglot/rust.md": "af91b22c93a7fe6833df156371d99bb105740684915bc73af4576f6de2897e10", "polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83", "polyglot/server-config-reference.md": "b2dc3ddd188b078875cb46bf32b94053d89912c063c1687cc98ff5ba2baba812", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/failures-and-recovery.md b/i18n/uk/docusaurus-plugin-content-docs/current/failures-and-recovery.md index e1be2576137..64fa21d305e 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/failures-and-recovery.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/failures-and-recovery.md @@ -335,6 +335,10 @@ class RetryableWorkflow extends Workflow } ``` +## Межі звітів про помилки Rust у service mode {#rust-failure-report-limits} + +Для service-mode worker, які фактично запускають Rust SDK **4.10.1 або новіший**, вихідний message має до62 KiB UTF-8 разом із маркером, stack —128 KiB за підтримки, сумарні серіалізовані необов’язкові metadata —64 KiB, повне закодоване тіло —1 MiB або нижчу відому транспортну межу. Тип, рішення retry та ідентичність claim зберігаються; неможливий обов’язковий envelope явно відхиляється. [Довідник Rust](./polyglot/rust.md#bounded-failure-reports) пояснює маркери пропусків, цілі Avro details та межі локальних результатів. Це не кваліфікує старі SDK, embedded mode чи окреме виправлення summary-сховища Core. + ## Пов’язані посібники {#related-guides} - [Гарантії виконання й ідемпотентність](./constraints/execution-guarantees.md) 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 fa81aa44b11..4e9998311c4 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/rust.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/rust.md @@ -320,6 +320,27 @@ pub fn register_charge(worker: &mut Worker) { Див. [методи ідентичності ActivityContext](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id) та [перевірку звичайного встановлення 4.9.0](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500) з ordinary/cooperative, local і worker-session контролями. Спільний контракт ідемпотентності описано в [гарантіях виконання](../constraints/execution-guarantees.md#service-activity-identity). +## Обмежені звіти про помилки {#bounded-failure-reports} + +Ці межі потребують фактично встановленого **Rust SDK 4.10.1 або новішого**. Перевірте `Cargo.lock` worker: новіший client чи checkout не оновлює старіший вибраний worker. Межі стосуються вихідних звітів про помилки, а не вхідної історії чи сторонніх бізнес-payload. + +| Поле або envelope | Максимум | +| --- | --- | +| UTF-8 message разом із маркером | 62 KiB | +| Stack, якщо підтримується | 128 KiB | +| Сумарні серіалізовані необов’язкові details, diagnostics і metadata | 64 KiB | +| Повне закодоване тіло запиту помилки | 1 MiB | + +Ефективна межа message резервує2 KiB від початкових64 KiB для timeline-префіксів опублікованого Server. JSON escaping, маркери, ідентичність claim та всі інші поля входять до закодованого тіла. Нижча відома транспортна межа може додатково зменшити максимуми. Малі звіти зберігають початковий вміст. + +Завеликий текст містить видимий маркер. Наявне `diagnostics.sdk_failure_truncation`, якщо схема його підтримує, записує початкові розміри в байтах та пропущені поля. Workflow/query-task схеми без diagnostics та прості повідомлення команд містять цю статистику в маркері message. Avro details лишаються цілим валідним envelope/runtime reference або повністю пропускаються з маркером; base 64 не обрізається до пошкодженого значення. + +Початкові тип винятку, рішення про retry та обов’язкова ідентичність claim зберігаються. Низькорівневі consumers можуть використовувати `Client::fail_activity_task_with_failure` і `Client::fail_workflow_task_with_failure` з опублікованою схемою помилки. `Error::FailureReporting` явно відмовляє, якщо обов’язкові дані не вміщаються; він не визначає retry-результат застосунку й не вигадує коротшу ідентичність. + +Локальні помилки обмежуються до того, як їх побачить workflow, включно з нормалізацією whitespace/NUL опублікованого Server. Фінальна перевірка запиту не переписує вже побачений локальний message чи інший бізнес-payload; якщо ці незмінні дані не вміщаються, reporting відмовляє. + +Ці 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 {#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 47391867d2d..5f2cf249aab 100644 --- a/i18n/uk/source-hashes.json +++ b/i18n/uk/source-hashes.json @@ -28,7 +28,7 @@ "defining-workflows/workflow-status.md": "8e8cb27ff44c890d489d89bf166375acfdfaecabd990a2235e106fab1592d529", "defining-workflows/workflows.md": "f467bc73de32aa5d722c61ce085065460382ae7dd44cea4625847d9fcdc4c97c", "deployment.md": "dd0b6bd184eda12e67922121a09c7f3c98346bde01be1d4c3217f168db5fd7ca", - "failures-and-recovery.md": "318f0cc183d26539c7d5b6bdf791429bb874b793b81cff4c6094ef1d11a796b2", + "failures-and-recovery.md": "7df0b7ce4139b789d8988ce2bf640c388225daa28731b88719e4777f61e40a4c", "features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082", "features/cancel-and-terminate.md": "c678fc7a0c9b11f0e1bee295aff259de9803219c0aa6769fb801622799e7deb1", "features/child-workflows.md": "57016591fb8816aed7b077e204f1c80f9c6a8dff7501bc00a141c41a4607306b", @@ -84,7 +84,7 @@ "polyglot/prerelease-history-migration.md": "a57f05f492228a8a67791f9152648a1e5f80856325b78777cf63b6ef49b7413c", "polyglot/python.md": "d55056ca7638df07b7267bc6d62e635b954957b99620478e861df90558860df3", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "5ff66bcb7e5369bcffd8611342a35c27028cac5a4ee376e86d90334a2b12d365", + "polyglot/rust.md": "af91b22c93a7fe6833df156371d99bb105740684915bc73af4576f6de2897e10", "polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83", "polyglot/server-config-reference.md": "b2dc3ddd188b078875cb46bf32b94053d89912c063c1687cc98ff5ba2baba812", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/failures-and-recovery.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/failures-and-recovery.md index 8014b426c87..f293bc92546 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/failures-and-recovery.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/failures-and-recovery.md @@ -259,6 +259,10 @@ class RetryableWorkflow extends Workflow } ``` +## Rust 服务模式失败报告上限 {#rust-failure-report-limits} + +实际运行 Rust SDK **4.10.1 或更新版本**的服务 worker,其发出 UTF-8 message 含标记最多62 KiB,受支持 stack 为128 KiB,可选 metadata 合计序列化结果为64 KiB,完整编码 body 为1 MiB或已知更低传输上限。type、retry 决定和 claim 标识保持不变;必需 envelope 无法容纳时显式拒绝。[Rust 报告指南](./polyglot/rust.md#bounded-failure-reports)说明省略标记、完整 Avro details 和本地结果边界。这不构成对旧 SDK、embedded mode 或独立 Core summary 存储修复的验证。 + ## 相关指南 {#related-guides} - [执行保证与幂等性](./constraints/execution-guarantees.md)介绍影响本页所有恢复路径的重放、重试、租约过期和重新投递契约。 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 c7929fb34f0..dd88da5c79c 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 @@ -267,6 +267,27 @@ pub fn register_charge(worker: &mut Worker) { 请参阅 [ActivityContext 标识方法](https://rust.durable-workflow.com/durable_workflow/struct.ActivityContext.html#method.activity_execution_id)及包含 ordinary/cooperative、本地和 worker-session 验证的[正常安装 4.9.0 记录](https://github.com/durable-workflow/sdk-rust/issues/139#issuecomment-6367230500)。共享幂等性契约见[执行保证](../constraints/execution-guarantees.md#service-activity-identity)。 +## 有界失败报告 {#bounded-failure-reports} + +这些报告上限要求**实际安装 Rust SDK 4.10.1 或更新版本**。应检查 worker 的 `Cargo.lock`;新 client 或源码 checkout 不会更新旧 worker。限制针对发出的失败报告,不针对收到的历史或其他业务 payload。 + +| 字段或 envelope | 最大值 | +| --- | --- | +| 包含标记的 UTF-8 message | 62 KiB | +| 受支持的 stack | 128 KiB | +| 可选 details、diagnostics、metadata 合计序列化结果 | 64 KiB | +| 完整编码后的失败请求 body | 1 MiB | + +有效 message 上限从原64 KiB预算中预留2 KiB,供已发布 Server 的 timeline 前缀使用。JSON 转义、截断标记、claim 标识和所有其他字段均计入编码后的 body。已知更低的传输上限可进一步降低这些最大值。小报告保留原始内容。 + +过大的文本带可见标记。schema 支持时,已有 `diagnostics.sdk_failure_truncation` 记录原始字节数和省略字段。没有 diagnostics 的 workflow/query-task schema 及普通命令 message 将这些统计放在 message 标记中。Avro details 保持为完整有效 envelope/runtime reference,或整体省略并标记,不会把 base64 切成损坏值。 + +原异常 type、retry 决定和必需 claim 标识保持不变。低层 consumer 可使用已发布 failure schema 及 `Client::fail_activity_task_with_failure`、`Client::fail_workflow_task_with_failure`。必需数据放不下时,`Error::FailureReporting` 显式拒绝;它不决定应用的重试结果,也不伪造更短的标识。 + +本地失败在 workflow 代码观察前受到限制,包括已发布 Server 的空白/NUL 规范化。最终请求检查不重写已经观察到的本地 message 或其他业务 payload;这些固定输入放不下时,报告会被拒绝。 + +这些 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)。 + ## 本地活动 {#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 47391867d2d..5f2cf249aab 100644 --- a/i18n/zh-Hans/source-hashes.json +++ b/i18n/zh-Hans/source-hashes.json @@ -28,7 +28,7 @@ "defining-workflows/workflow-status.md": "8e8cb27ff44c890d489d89bf166375acfdfaecabd990a2235e106fab1592d529", "defining-workflows/workflows.md": "f467bc73de32aa5d722c61ce085065460382ae7dd44cea4625847d9fcdc4c97c", "deployment.md": "dd0b6bd184eda12e67922121a09c7f3c98346bde01be1d4c3217f168db5fd7ca", - "failures-and-recovery.md": "318f0cc183d26539c7d5b6bdf791429bb874b793b81cff4c6094ef1d11a796b2", + "failures-and-recovery.md": "7df0b7ce4139b789d8988ce2bf640c388225daa28731b88719e4777f61e40a4c", "features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082", "features/cancel-and-terminate.md": "c678fc7a0c9b11f0e1bee295aff259de9803219c0aa6769fb801622799e7deb1", "features/child-workflows.md": "57016591fb8816aed7b077e204f1c80f9c6a8dff7501bc00a141c41a4607306b", @@ -84,7 +84,7 @@ "polyglot/prerelease-history-migration.md": "a57f05f492228a8a67791f9152648a1e5f80856325b78777cf63b6ef49b7413c", "polyglot/python.md": "d55056ca7638df07b7267bc6d62e635b954957b99620478e861df90558860df3", "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", - "polyglot/rust.md": "5ff66bcb7e5369bcffd8611342a35c27028cac5a4ee376e86d90334a2b12d365", + "polyglot/rust.md": "af91b22c93a7fe6833df156371d99bb105740684915bc73af4576f6de2897e10", "polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83", "polyglot/server-config-reference.md": "b2dc3ddd188b078875cb46bf32b94053d89912c063c1687cc98ff5ba2baba812", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",