diff --git a/docs/configuration/pruning-workflows.md b/docs/configuration/pruning-workflows.md index 6f50d7f81a4..fa1fa2a86e5 100644 --- a/docs/configuration/pruning-workflows.md +++ b/docs/configuration/pruning-workflows.md @@ -77,11 +77,13 @@ qualify a full application replay or restoration of external objects. windows and deduplicate by namespace and run id. Do not overwrite a verified full bundle with a later incomplete export. -These are application-owned steps, not a supported self-contained archive -operation. [Server #520](https://github.com/durable-workflow/server/issues/520) -tracks the missing product workflow that copies, retains and cold-verifies all -required external bytes. A successful reference-only export or manual checksum -check does not complete that requirement. +These are application-owned steps for embedded exports. An embedded export +keeps references to external payloads, so a successful export or checksum +check does not preserve the external bytes. On native Server 3.0.3 or +later, `dw` 2.13.0 or later with an admin credential writes a +[self-contained verified history archive](../polyglot/cli-reference.md#history-archives) +instead. That archive copies every referenced external object under the +Server's backup hold, then cold-verifies the bytes. :::warning Pruning is irreversible without a recovery copy diff --git a/docs/features/external-payload-storage.md b/docs/features/external-payload-storage.md index d9c2303f271..132f2bba2bf 100644 --- a/docs/features/external-payload-storage.md +++ b/docs/features/external-payload-storage.md @@ -124,8 +124,9 @@ service-mode clients rather than treating an embedded threshold as a wire limit. the object. Its checksum or `history_complete` flag does not prove that external bytes exist or that the archive can be replayed. Follow the [backup and restore boundary](../configuration/pruning-workflows.md#export-before-pruning) - and verify objects independently. Self-contained archives remain tracked in - [Server #520](https://github.com/durable-workflow/server/issues/520). + and verify objects independently. Embedded exports stay reference-only. On + native Server, `dw workflow:history-archive` copies the bytes into a + [self-contained verified archive](../polyglot/cli-reference.md#history-archives). ## Using It From Code diff --git a/docs/operator-operating-envelope.md b/docs/operator-operating-envelope.md index 856d0534dd7..19046f1eca3 100644 --- a/docs/operator-operating-envelope.md +++ b/docs/operator-operating-envelope.md @@ -621,10 +621,11 @@ Checksum and structure checks do not prove that an export contains all original events or independent external bytes. Reject already-pruned sources; the false complete-export flag remains an open defect in [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). -The self-contained verified archive operation requested in -[Server #520](https://github.com/durable-workflow/server/issues/520) is also -not delivered by this manual procedure. Keep those product gaps separate from -the recovery checks your deployment actually passed. +This manual procedure also does not produce a self-contained archive. On +native Server, use `dw workflow:history-archive` +([history archive commands](./polyglot/cli-reference.md#history-archives)) for +that. Keep that product gap separate from the recovery checks your deployment +actually passed. For Waterline users, the matching history-export and archive routes are listed in the [Waterline Operator API Reference](./waterline-operator-api.md). diff --git a/docs/polyglot/cli-reference.md b/docs/polyglot/cli-reference.md index 030068e4f62..24780d4d7d4 100644 --- a/docs/polyglot/cli-reference.md +++ b/docs/polyglot/cli-reference.md @@ -234,7 +234,9 @@ runtime environment and not in the profile file. | `dw workflow:list-runs ` | List runs for a workflow instance. | `--json` | | `dw workflow:show-run ` | Show one run. | `--follow`, `--json` | | `dw workflow:history ` | Read run history events. | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | Export the archival run-history payload. | `--output-file`, global options | +| `dw workflow:history-export ` | Export the run-history bundle. External payloads stay references. | `--output-file`, global options | +| `dw workflow:history-archive ` | Write a self-contained verified archive of a closed run, including every external payload's bytes (native Server). | `--hold-ttl`, `--json`, global options | +| `dw workflow:history-archive-check ` | Verify a history archive from its files alone. | `--json` | | `dw workflow:signal ` | Send a signal. | `--request-id`, `--run-id`, input options, `--json` | | `dw workflow:query ` | Execute a read-only workflow query. | `--run-id`, input options, `--json` | | `dw workflow:update ` | Submit or execute a workflow update. | `--wait=accepted\|completed`, `--request-id`, `--run-id`, input options, `--json` | @@ -314,6 +316,59 @@ second. A failed update exits 2. An unknown or pruned update ID exits 5, which does not prove the update was never admitted. A Server without the capability, including PHP Server 2.x, exits 8 before an outcome request is sent. +### History archives {#history-archives} + +`dw workflow:history-archive` (dw 2.13.0 or later, native Server 3.0.3 or +later, admin credential) writes one closed run to a directory. It uses the +Server's history export, external payload fetch and backup hold routes. The +directory holds the Server's history export, the exact bytes of every external +payload the export references, a `manifest.json` with each object's codec, +length and SHA-256, and a `receipt.json`. + +The copy works like this: + +1. dw acquires the Server's external payload backup hold, so no payload is + reclaimed during the copy. +2. dw fetches each object once and checks its length and digest. +3. dw verifies the whole directory from disk. +4. dw confirms that the hold never lapsed. +5. Only then does dw write the receipt. + +The hold is released on every path. That includes Ctrl-C (exit 130) and, on +Unix, SIGTERM (exit 143). No receipt is written after a signal. + +`--hold-ttl` sets the hold lease in seconds: 900 by default, from 60 to 3600. +Each object must arrive within half the lease, so raise it for large objects. + +The command reports one of three outcomes: + +| Outcome | Exit | Meaning | +| --- | --- | --- | +| `verified` | 0 | The archive is complete. | +| `incomplete` | 1 | No receipt was written. Run the same command again to resume. | +| `refused` | 2 | Nothing was copied. The run is open, pruned or redacted, its history has a sequence gap, or it holds a reference the runtime transport cannot fetch. | + +Other backups use the same hold, so a copy is refused with HTTP 409 (exit 2) +while one holds it; retry later. A non-admin token gets HTTP 403 (exit 4), and +nothing is copied. A Server without the backup hold route, or an invalid +`--hold-ttl`, exits 1. Other connection, authentication and Server errors keep +their usual exit codes. + +`dw workflow:history-archive-check ` needs no Server. It reads every +file back and reports `verified`, `incomplete` with a coded finding for each +failed check, or `refused`. + +Native Server 3.30.0 adds only an offline verifier, +`durable-workflow-server history-archive verify `, which +`dw workflow:history-archive` does not need. The verifier reads only the +directory, prints the JSON report and exits 0 only when the outcome is +`verified`. + +An archive covers the selected run only. It is not a database backup. It is +written unencrypted, and its lifetime is application-owned. The format, scope +and finding codes are in the Server's +[history archive guide](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md). + ## Service Call Inspection Use `dw service-call:describe ` diff --git a/docs/polyglot/server.md b/docs/polyglot/server.md index 89fc4536387..37a6a27b2ff 100644 --- a/docs/polyglot/server.md +++ b/docs/polyglot/server.md @@ -511,12 +511,19 @@ covers `CloseTime` selection, pagination, external bytes and export-before-prune reconciliation. The published API has no unarchive operation. An archived run therefore cannot later be removed through Server retention passes. -Current history exports preserve external references, not an independent copy -of their objects. The self-contained verified archive workflow is requested in -[Server #520](https://github.com/durable-workflow/server/issues/520), not supplied -by an export plus a checksum. Also reject already-pruned history rather than -trusting its `history_complete` flag; the known false-complete case remains open -in [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). +A history export preserves external references, not an independent copy of +their objects. On native Server 3.0.3 or later, `dw workflow:history-archive` +(dw 2.13.0 or later, admin credential) writes a self-contained verified +archive. It holds the export, the exact bytes of every external object it +references, a manifest of their digests and a receipt. The archive stays +readable after retention prunes the run, and without the Server or its payload +store. See the [history archive commands](./cli-reference.md#history-archives) +and the Server's +[archive format guide](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md). +Native Server 3.30.0 adds only the offline verifier +`durable-workflow-server history-archive verify`. Also reject already-pruned +history rather than trusting its `history_complete` flag; the known +false-complete case remains open in [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Pruning removes history, related details and eligible external payloads. A later policy extension cannot recover them. The [embedded pruning guide](../configuration/pruning-workflows.md) diff --git a/i18n/de/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md b/i18n/de/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md index 1928aa785c5..d8bd3c75aa9 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md @@ -39,7 +39,7 @@ Die Beispiele wurden mit veröffentlichtem PHP Server **2.9.5**, dessen geladene 5. **Externe Bytes erhalten.** Exporte enthalten externe Referenzhüllen, keine unabhängige Kopie jedes referenzierten Objekts. Erhalten Sie diese Bytes für die Lebensdauer des Exports und testen Sie den Abruf ohne warmen Laufzeit-Cache. Beachten Sie den [Lebenszyklus externer Payloads](../features/external-payload-storage.md#replay-retention-and-cleanup). 6. **Vor Bereinigung abgleichen.** Vergleichen Sie das Inventar geschlossener Läufe mit geprüften Zielkopien. Alarmieren Sie bei fehlenden Laufkennungen, fehlgeschlagenen Prüfungen und Exportverzug nahe der Löschgrenze. Schreiben Sie den Exportprüfpunkt erst fort, wenn jeder Kandidat nachgewiesen ist. Prüfen Sie überlappende Abschlusszeitfenster erneut und deduplizieren Sie nach Namespace und Laufkennung. Überschreiben Sie kein geprüftes vollständiges Paket mit einem späteren unvollständigen Export. -Diese Schritte liegen bei der Anwendung und sind kein vom Produkt unterstützter eigenständiger Archivierungsvorgang. [Server #520](https://github.com/durable-workflow/server/issues/520) erfasst den fehlenden Produktablauf, der alle erforderlichen externen Bytes kopiert, erhält und kalt prüft. Ein erfolgreicher Export nur mit Referenzen oder eine manuelle Prüfsummenkontrolle erfüllt diese Anforderung nicht. +Diese Schritte liegen bei der Anwendung und gelten für eingebettete Exporte. Ein eingebetteter Export behält Referenzen auf externe Payloads, daher erhält ein erfolgreicher Export oder eine Prüfsummenkontrolle die externen Bytes nicht. Auf nativem Server 3.0.3 oder neuer schreibt `dw` 2.13.0 oder neuer mit Admin-Zugangsdaten stattdessen ein [eigenständiges, verifiziertes Historienarchiv](../polyglot/cli-reference.md#history-archives). Dieses Archiv kopiert jedes referenzierte externe Objekt unter der Backup-Sperre des Servers und prüft die Bytes anschließend kalt. :::warning Ohne Wiederherstellungskopie ist die Bereinigung unumkehrbar diff --git a/i18n/de/docusaurus-plugin-content-docs/current/features/external-payload-storage.md b/i18n/de/docusaurus-plugin-content-docs/current/features/external-payload-storage.md index 44393bc5873..455249cdd14 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/features/external-payload-storage.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/features/external-payload-storage.md @@ -71,7 +71,7 @@ Lassen Sie Abstand zu normalen Anfrage- und Nutzlastlimits. Der Schwellenwert gi - **Replay-Integrität.** Ein Wert wird erst nach Abruf und Prüfung seiner Bytes decodiert. Bewahren Sie Objekte für jeden aufbewahrten Lauf auf, der sie noch benötigt. - **Cache geprüfter Abrufe.** `ExternalPayloadStorage` begrenzt seinen Cache geprüfter Bytes. Das Leeren löscht weder das Objekt noch ändert es dessen Eigentümerschaft. - **Aufbewahrung.** Die Runtime-Bereinigung berücksichtigt aufbewahrte Eigentümer und gemeinsam verwendete Objekte. Speicherfehler, Backup-Sperren oder verbleibende Referenzen können die Löschung verzögern. Eine laufende Aufbewahrungsbereinigung garantiert keine Abwesenheit verwaister Objekte. -- **Verlaufsexport.** Ein Export kann Referenzmetadaten ohne Objektabruf aufbewahren. Seine Prüfsumme oder `history_complete` beweisen weder die Existenz externer Bytes noch die Wiedergebbarkeit des Archivs. Beachten Sie die [Backup- und Wiederherstellungsgrenze](../configuration/pruning-workflows.md#export-before-pruning), und prüfen Sie Objekte gesondert. Eigenständige Archive werden weiter in [Server #520](https://github.com/durable-workflow/server/issues/520) verfolgt. +- **Verlaufsexport.** Ein Export kann Referenzmetadaten ohne Objektabruf aufbewahren. Seine Prüfsumme oder `history_complete` beweisen weder die Existenz externer Bytes noch die Wiedergebbarkeit des Archivs. Beachten Sie die [Backup- und Wiederherstellungsgrenze](../configuration/pruning-workflows.md#export-before-pruning), und prüfen Sie Objekte gesondert. Eingebettete Exporte bleiben reine Referenzexporte. Auf nativem Server kopiert `dw workflow:history-archive` die Bytes in ein [eigenständiges, verifiziertes Archiv](../polyglot/cli-reference.md#history-archives). ## Verwendung im Code {#using-it-from-code} diff --git a/i18n/de/docusaurus-plugin-content-docs/current/operator-operating-envelope.md b/i18n/de/docusaurus-plugin-content-docs/current/operator-operating-envelope.md index c82b10695de..9467f4a7419 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/operator-operating-envelope.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/operator-operating-envelope.md @@ -392,7 +392,7 @@ Verwenden Sie diese Prüfreihenfolge: Die entsprechenden Waterline-Routen stehen in der [Waterline-Betriebs-API-Referenz](./waterline-operator-api.md). -Prüfsummen- und Strukturprüfungen beweisen nicht, dass ein Export alle ursprünglichen Ereignisse oder unabhängige externe Bytes enthält. Lehnen Sie bereits bereinigte Quellen ab. Das falsche Vollständigkeitsmerkmal bleibt unter [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) ein offener Fehler. Dieses manuelle Verfahren liefert auch nicht den unter [Server #520](https://github.com/durable-workflow/server/issues/520) geforderten eigenständigen, verifizierten Archivierungsvorgang. Unterscheiden Sie diese Produktlücken von den tatsächlich bestandenen Wiederherstellungsprüfungen Ihrer Bereitstellung. +Prüfsummen- und Strukturprüfungen beweisen nicht, dass ein Export alle ursprünglichen Ereignisse oder unabhängige externe Bytes enthält. Lehnen Sie bereits bereinigte Quellen ab. Das falsche Vollständigkeitsmerkmal bleibt unter [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) ein offener Fehler. Dieses manuelle Verfahren erzeugt auch kein eigenständiges Archiv. Verwenden Sie dafür auf nativem Server `dw workflow:history-archive` ([Befehle für Historienarchive](./polyglot/cli-reference.md#history-archives)). Unterscheiden Sie diese Produktlücke von den tatsächlich bestandenen Wiederherstellungsprüfungen Ihrer Bereitstellung. ## Vertrag für Sicherung, Wiederherstellung und Notfallwiederanlauf {#backup-restore-and-disaster-recovery-contract} diff --git a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md index 056306161ed..1932720c916 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md @@ -231,7 +231,9 @@ der Laufzeitumgebung statt in der Profildatei bleiben. | `dw workflow:list-runs ` | Läufe einer Workflow-Instanz auflisten. | `--json` | | `dw workflow:show-run ` | Einen Lauf anzeigen. | `--follow`, `--json` | | `dw workflow:history ` | Historienereignisse eines Laufs lesen. | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | Archivnutzlast der Laufhistorie exportieren. | `--output-file`, globale Optionen | +| `dw workflow:history-export ` | Bundle der Laufhistorie exportieren. Externe Payloads bleiben Referenzen. | `--output-file`, globale Optionen | +| `dw workflow:history-archive ` | Eigenständiges, verifiziertes Archiv eines geschlossenen Laufs schreiben, einschließlich der Bytes jeder externen Payload (nativer Server). | `--hold-ttl`, `--json`, globale Optionen | +| `dw workflow:history-archive-check ` | Ein Historienarchiv allein anhand seiner Dateien prüfen. | `--json` | | `dw workflow:signal ` | Signal senden. | `--request-id`, `--run-id`, Eingabeoptionen, `--json` | | `dw workflow:query ` | Schreibgeschützte Workflow-Abfrage ausführen. | `--run-id`, Eingabeoptionen, `--json` | | `dw workflow:update ` | Workflow-Update übermitteln oder ausführen. | `--wait=accepted\|completed`, `--request-id`, `--run-id`, Eingabeoptionen, `--json` | @@ -314,6 +316,64 @@ oder entfernte Update-ID endet mit 5. Das beweist nicht, dass das Update nie angenommen wurde. Ohne die Fähigkeit, auch bei PHP Server 2.x, endet der Befehl mit 8, bevor eine Ergebnisanfrage gesendet wird. +### Historienarchive {#history-archives} + +`dw workflow:history-archive` (dw 2.13.0 oder neuer, nativer Server +3.0.3 oder neuer, Admin-Zugangsdaten) schreibt einen geschlossenen Lauf +in ein Verzeichnis. Der Befehl verwendet die Server-Routen für den +Historienexport, den Abruf externer Payloads und die Backup-Sperre. Das Verzeichnis enthält den Historienexport des Servers, die +exakten Bytes jeder externen Payload, auf die der Export verweist, eine +`manifest.json` mit Codec, Länge und SHA-256 jedes Objekts sowie eine +`receipt.json`. + +Die Kopie läuft so ab: + +1. dw erwirbt die Backup-Sperre des Servers für externe Payloads, damit während + der Kopie keine Payload entfernt wird. +2. dw ruft jedes Objekt einmal ab und prüft Länge und Digest. +3. dw prüft das gesamte Verzeichnis von der Festplatte. +4. dw bestätigt, dass die Sperre nie abgelaufen ist. +5. Erst dann schreibt dw die Quittung. + +Die Sperre wird auf jedem Weg freigegeben. Das gilt auch für Ctrl-C (Exitcode +130) und unter Unix für SIGTERM (Exitcode 143). Nach einem Signal wird keine +Quittung geschrieben. + +`--hold-ttl` legt die Laufzeit der Sperre in Sekunden fest: standardmäßig 900, +zulässig von 60 bis 3600. Jedes Objekt muss innerhalb der halben Laufzeit +eintreffen; erhöhen Sie den Wert daher für große Objekte. + +Der Befehl meldet eines von drei Ergebnissen: + +| Ergebnis | Exitcode | Bedeutung | +| --- | --- | --- | +| `verified` | 0 | Das Archiv ist vollständig. | +| `incomplete` | 1 | Es wurde keine Quittung geschrieben. Führen Sie denselben Befehl erneut aus, um fortzusetzen. | +| `refused` | 2 | Es wurde nichts kopiert. Der Lauf ist offen, bereinigt oder geschwärzt, seine Historie hat eine Sequenzlücke, oder er enthält eine Referenz, die der Laufzeittransport nicht abrufen kann. | + +Andere Backups verwenden dieselbe Sperre. Solange eines sie hält, wird eine +Kopie mit HTTP 409 abgelehnt (Exitcode 2); versuchen Sie es später erneut. Ein +Token ohne Admin-Rechte erhält HTTP 403 (Exitcode 4), und es wird nichts +kopiert. Ein Server ohne die Route für die Backup-Sperre oder ein ungültiger +Wert für `--hold-ttl` führt zu Exitcode 1. Andere Verbindungs-, +Authentifizierungs- und Serverfehler behalten ihre üblichen Exitcodes. + +`dw workflow:history-archive-check ` benötigt keinen Server. Der +Befehl liest jede Datei zurück und meldet `verified`, `incomplete` mit einem +codierten Befund für jede fehlgeschlagene Prüfung oder `refused`. + +Der native Server 3.30.0 ergänzt nur einen Offline-Prüfer, +`durable-workflow-server history-archive verify `, den +`dw workflow:history-archive` nicht benötigt. Der Prüfer liest +nur das Verzeichnis, gibt den JSON-Bericht aus und endet nur beim Ergebnis +`verified` mit 0. + +Ein Archiv umfasst nur den ausgewählten Lauf. Es ist kein Datenbank-Backup. Es +wird unverschlüsselt geschrieben, und seine Lebensdauer liegt bei der Anwendung. +Format, Umfang und Befundcodes stehen im +[Leitfaden zu Historienarchiven](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) +des Servers. + ## Dienstaufrufe untersuchen {#service-call-inspection} Mit `dw service-call:describe ` diff --git a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server.md b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server.md index 6e7e34ab187..652de0d822f 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server.md @@ -376,7 +376,7 @@ Für längere Nachweise als 1 bis 365 Tage wählen Sie Datenbankerhalt oder unab Bereinigung entfernt Historie, zugehörige Details und geeignete externe Payloads. Eine spätere Verlängerung stellt sie nicht wieder her. Der [eingebettete Bereinigungsleitfaden](../configuration/pruning-workflows.md) beschreibt einen eigenen anwendungsgesteuerten Vorgang; seine API verwendet nicht Servers Namespace-Regel. Prüfen Sie für andere Laufzeiten deren Verhalten, bevor Sie dieses PHP-Verfahren anwenden. -Aktuelle Historienexporte erhalten externe Referenzen, keine unabhängigen Kopien der Objekte. Der eigenständige, verifizierte Archivierungsablauf wird unter [Server #520](https://github.com/durable-workflow/server/issues/520) gefordert; ein Export mit Prüfsumme liefert ihn nicht. Lehnen Sie auch bereits bereinigte Historie ab, statt ihrem Merkmal `history_complete` zu vertrauen. Der bekannte falsche Vollständigkeitsnachweis bleibt unter [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) offen. +Ein Historienexport erhält externe Referenzen, keine unabhängigen Kopien der Objekte. Auf nativem Server 3.0.3 oder neuer schreibt `dw workflow:history-archive` (dw 2.13.0 oder neuer, Admin-Zugangsdaten) ein eigenständiges, verifiziertes Archiv. Es enthält den Export, die exakten Bytes jedes referenzierten externen Objekts, ein Manifest ihrer Digests und eine Quittung. Das Archiv bleibt lesbar, nachdem die Aufbewahrung den Lauf bereinigt hat, und auch ohne den Server oder dessen Payload-Speicher. Siehe die [Befehle für Historienarchive](./cli-reference.md#history-archives) und den [Leitfaden zum Archivformat](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) des Servers. Der native Server 3.30.0 ergänzt nur den Offline-Prüfer `durable-workflow-server history-archive verify`. Lehnen Sie auch bereits bereinigte Historie ab, statt ihrem Merkmal `history_complete` zu vertrauen. Der bekannte falsche Vollständigkeitsnachweis bleibt unter [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) offen. ### Namespaces {#namespaces} diff --git a/i18n/de/source-hashes.json b/i18n/de/source-hashes.json index caa754f7a02..3e58ba988e9 100644 --- a/i18n/de/source-hashes.json +++ b/i18n/de/source-hashes.json @@ -10,7 +10,7 @@ "configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a", "configuration/microservices.md": "7421f8f18b62bc326601e2670ba15ba45fb02056da0d70e94ef89b3870f79cb0", "configuration/options.md": "d5079c5059aaa1072693ac09b3b8ea2be9176279820459370e5ebe6660d9f43b", - "configuration/pruning-workflows.md": "6f6ee2be3bd185ffec764e86c3ed3cbd40c45f75d28671b4cd11226493e11afb", + "configuration/pruning-workflows.md": "13b314e3da5446788691cfc5801be68591fb11c9b8a7605ef58946692d7062ae", "configuration/publishing-config.md": "3c84a87186db1eec8f59d25b81e6018ffabe3afb8ce2bb5011e66fccabb3221d", "constraints/activity-constraints.md": "5a953d0e95e750b6c02d1c72b72199fb3ff4687540cebc56aa3b216cf667bb05", "constraints/constraints-summary.md": "fb48d01502388fc3821eae3790f470ed29cec91545420450f96fc77b84e589f1", @@ -38,7 +38,7 @@ "features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e", "features/continue-as-new.md": "e77725263167c3f64eac639ea43b83722a1c722804062562ab081bae5ef8c354", "features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b", - "features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898", + "features/external-payload-storage.md": "5b5e35b99ef4d37cf02dcd01a0099a612b19ec04b50a00275fd742c739f836a7", "features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365", "features/local-activities.md": "05fca8f2104d8f4e7bd8b48040f5615f18d0ee2795922fb65c56f8d3d70ed204", "features/memo.md": "e1bb34216febf112c0d9151b8a57e31cc2de17b4bf16980812da01c0e1c17f15", @@ -66,13 +66,13 @@ "mcp-workflows.md": "1c0b5bb7f2e5c7ca835dfdfa57bbe8f6624172c855f4e225057ac2377abf360e", "migration.md": "7304a53786d5e45d3a639c33386e6558e855ee77982883a5e051ef5084b8453b", "monitoring.md": "a64e6b94bb67ffc5c43d8030f18582f96c3d170e8b2bedaa83f280d45c98bbaf", - "operator-operating-envelope.md": "dc0cf13d8593e4ce2d8ec1912e45e61c9bf13f06abf7cc8c422379db5e3fa0ad", + "operator-operating-envelope.md": "516502ae2b2d0e574fb8b4fe3a2d5a187e5f07f3d041a1ab2053c5167503e213", "platform-conformance.md": "2eec7eba9a65c010e03c4b2eb78afe4dddd6fd8170218b3194c49e3777124c91", "platform-protocol-specs.md": "ba9c69adfca7fb4a0dd982464b0ca69dd5a21de1e340edbe23b075ec0fb0c35c", "polyglot/avro-value-protocol.md": "602e66c6288c1dd69d2b400c64e4739ad3a0493b5be269cee40f7848b11f260a", "polyglot/cancellation.md": "f676cd3ddb39246a0f580a1e16c83bc36d2ed9458b9e6009af4cc192d299ac62", "polyglot/cli-python-parity.md": "50f9da7fc410f1046328b35333feb3c123e7007316b5ce5b07f88404537ae36f", - "polyglot/cli-reference.md": "9028b697b8d41abdbf5d8d1d929aff656b905e2742b1c923dc21feea7df3fc7d", + "polyglot/cli-reference.md": "33f06968034324ed9813b1d7187fa2dccb689353616e59c6733e033ea285f0fe", "polyglot/cli.mdx": "dd4085314000b01ef1addf1686d287cfa2c1207797cb1126bc7cf44751daade1", "polyglot/cloud-control-plane.md": "9dc0b85e5ea41d59e55a8d12bef7b2dcafe69d9c499fb1305f58fde7a28d3e07", "polyglot/database-support.md": "518f679ae723ae4d39db7cac78008bc8edb84a6cfba2e6c668d8f2be5d378d03", @@ -93,7 +93,7 @@ "polyglot/server-api-reference.md": "dab6924c622276373f69185295cb78b19a3a1c531db304e5106d0f02fdfe987c", "polyglot/server-config-reference.md": "36ecbb5b76246f9c8e434b79745c3fef3265d0606aae486247064e23e7a6bb64", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", - "polyglot/server.md": "599367e6efc4819ec013114318e207cac9d54a02a74f434482f4c17595f201b3", + "polyglot/server.md": "4ae391d98cc7d2d698c9800a382ccc9a5767780bfcb12ebf7436a312a636262f", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", "polyglot/task-matching-dispatch.md": "9c8ffbbee16b5da48e7882721d7ba8eac209a374a6ca766d93d2b17e825b203d", "polyglot/task-queue-admission.md": "efcf934876a27c153dd3ecd1a995e7c08b37452c79dfcbba1ae7fa0a8cbad327", diff --git a/i18n/es/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md b/i18n/es/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md index 6dd062732b5..0d1bbc0a8c9 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md @@ -39,7 +39,7 @@ Los ejemplos se comprobaron con PHP Server **2.9.5** publicado, su Workflow **2. 5. **Conserve los bytes externos.** Las exportaciones conservan las envolturas de referencias externas, no una copia independiente de cada objeto. Conserve esos bytes durante toda la vida de la exportación y pruebe su recuperación sin una caché caliente del runtime. Siga el [ciclo de vida de las cargas externas](../features/external-payload-storage.md#replay-retention-and-cleanup). 6. **Concilie antes de limpiar.** Compare el inventario de ejecuciones cerradas con los registros verificados en el destino. Alerte ante ids ausentes, verificaciones fallidas y exportaciones pendientes que se acerquen al límite. Avance el punto de control solo después de contabilizar cada candidata. Vuelva a examinar ventanas superpuestas de cierre y deduplique por namespace e id de ejecución. No reemplace un paquete completo verificado por una exportación posterior incompleta. -Estos pasos son responsabilidad de la aplicación, no una operación de archivado autosuficiente admitida por el producto. [Server #520](https://github.com/durable-workflow/server/issues/520) registra la función que falta para copiar, retener y verificar en frío todos los bytes externos necesarios. Una exportación correcta de solo referencias o una suma de comprobación manual no satisfacen ese requisito. +Estos pasos son responsabilidad de la aplicación para las exportaciones integradas. Una exportación integrada conserva referencias a las cargas externas, así que una exportación o una suma de comprobación correctas no preservan los bytes externos. En el Server native 3.0.3 o posterior, `dw` 2.13.0 o posterior, con una credencial de administrador, escribe en su lugar un [archivo de historial autosuficiente verificado](../polyglot/cli-reference.md#history-archives). Ese archivo copia cada objeto externo referenciado bajo el bloqueo de copia de seguridad del Server y después verifica los bytes en frío. :::warning La depuración es irreversible sin una copia de recuperación diff --git a/i18n/es/docusaurus-plugin-content-docs/current/features/external-payload-storage.md b/i18n/es/docusaurus-plugin-content-docs/current/features/external-payload-storage.md index f4b70185320..d429fdc1136 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/features/external-payload-storage.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/features/external-payload-storage.md @@ -71,7 +71,7 @@ Deja margen respecto a los límites normales de solicitudes y cargas. El umbral - **Integridad de la reproducción.** Un valor solo se decodifica después de recuperar y verificar sus bytes. Conserva los objetos que aún necesite cualquier ejecución retenida. - **Caché de lecturas verificadas.** `ExternalPayloadStorage` limita su caché de bytes verificados. Vaciarla no elimina el objeto ni cambia su propietario. - **Retención.** La limpieza del runtime tiene en cuenta propietarios retenidos y objetos compartidos. Los fallos de almacenamiento, retenciones por copia de seguridad o referencias restantes pueden retrasar el borrado. Ejecutar la retención no garantiza que no queden objetos huérfanos. -- **Exportación del historial.** Una exportación puede conservar metadatos de referencias sin obtener el objeto. Su suma de comprobación o `history_complete` no demuestra que existan los bytes externos ni que se pueda reproducir el archivo. Respeta el [límite de copia y restauración](../configuration/pruning-workflows.md#export-before-pruning) y verifica los objetos por separado. Los archivos autosuficientes siguen abiertos en [Server #520](https://github.com/durable-workflow/server/issues/520). +- **Exportación del historial.** Una exportación puede conservar metadatos de referencias sin obtener el objeto. Su suma de comprobación o `history_complete` no demuestra que existan los bytes externos ni que se pueda reproducir el archivo. Respeta el [límite de copia y restauración](../configuration/pruning-workflows.md#export-before-pruning) y verifica los objetos por separado. Las exportaciones integradas siguen siendo solo de referencias. En el Server native, `dw workflow:history-archive` copia los bytes en un [archivo autosuficiente verificado](../polyglot/cli-reference.md#history-archives). ## Uso desde código {#using-it-from-code} diff --git a/i18n/es/docusaurus-plugin-content-docs/current/operator-operating-envelope.md b/i18n/es/docusaurus-plugin-content-docs/current/operator-operating-envelope.md index 32bc749265d..6817df20011 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/operator-operating-envelope.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/operator-operating-envelope.md @@ -395,7 +395,7 @@ Use esta secuencia de verificación: Las rutas correspondientes de exportación y archivo para Waterline figuran en la [referencia de su API de operador](./waterline-operator-api.md). -Las comprobaciones de suma y estructura no demuestran que una exportación contenga todos los eventos originales ni bytes externos independientes. Rechace fuentes ya depuradas: la marca falsa de exportación completa sigue siendo un defecto abierto en [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Este procedimiento manual tampoco entrega la operación de archivado autosuficiente verificado solicitada en [Server #520](https://github.com/durable-workflow/server/issues/520). Distinga esas carencias del producto de las pruebas de recuperación que su despliegue sí haya superado. +Las comprobaciones de suma y estructura no demuestran que una exportación contenga todos los eventos originales ni bytes externos independientes. Rechace fuentes ya depuradas: la marca falsa de exportación completa sigue siendo un defecto abierto en [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Este procedimiento manual tampoco produce un archivo autosuficiente. Para eso, en el Server native use `dw workflow:history-archive` ([comandos de archivo de historial](./polyglot/cli-reference.md#history-archives)). Distinga esa carencia del producto de las pruebas de recuperación que su despliegue sí haya superado. ## Contrato de copia, restauración y recuperación ante desastres {#backup-restore-and-disaster-recovery-contract} diff --git a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md index 59bf58c1e03..1b4c74915af 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md @@ -148,7 +148,9 @@ Prefiere `--token-env=NAME` en producción para mantener secretos en el entorno | `dw workflow:list-runs ` | Listar ejecuciones de una instancia. | `--json` | | `dw workflow:show-run ` | Mostrar una ejecución. | `--follow`, `--json` | | `dw workflow:history ` | Leer eventos del historial. | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | Exportar la carga de historial para archivo. | `--output-file`, opciones globales | +| `dw workflow:history-export ` | Exportar el paquete del historial de la ejecución. Las cargas externas siguen siendo referencias. | `--output-file`, opciones globales | +| `dw workflow:history-archive ` | Escribir un archivo autosuficiente verificado de una ejecución cerrada, con los bytes de cada carga externa (Server native). | `--hold-ttl`, `--json`, opciones globales | +| `dw workflow:history-archive-check ` | Verificar un archivo de historial solo a partir de sus ficheros. | `--json` | | `dw workflow:signal ` | Enviar una señal. | `--request-id`, `--run-id`, opciones de entrada, `--json` | | `dw workflow:query ` | Ejecutar una consulta de solo lectura. | `--run-id`, opciones de entrada, `--json` | | `dw workflow:update ` | Enviar o ejecutar una actualización. | `--wait=accepted\|completed`, `--request-id`, `--run-id`, opciones de entrada, `--json` | @@ -215,6 +217,65 @@ sale con 5, lo que no demuestra que la actualización nunca fuera aceptada. Un Server sin la capacidad, incluido PHP Server 2.x, produce el código 8 antes de enviar una solicitud de resultado. +### Archivos de historial {#history-archives} + +`dw workflow:history-archive` (dw 2.13.0 o posterior, Server native +3.0.3 o posterior, credencial de administrador) escribe una ejecución +cerrada en un directorio. Usa las rutas del Server de exportación del +historial, obtención de cargas externas y bloqueo de copia de seguridad. El directorio contiene la exportación del historial +del Server, los bytes exactos de cada carga externa que la exportación +referencia, un `manifest.json` con el codec, la longitud y el SHA-256 de cada +objeto, y un `receipt.json`. + +La copia funciona así: + +1. dw adquiere el bloqueo de copia de seguridad de cargas externas del Server, + para que no se libere ninguna carga durante la copia. +2. dw obtiene cada objeto una vez y comprueba su longitud y su resumen. +3. dw verifica todo el directorio desde el disco. +4. dw confirma que el bloqueo nunca caducó. +5. Solo entonces dw escribe el recibo. + +El bloqueo se libera en todos los casos. Eso incluye Ctrl-C (código de salida +130) y, en Unix, SIGTERM (código de salida 143). Tras una señal no se escribe +ningún recibo. + +`--hold-ttl` fija la duración del bloqueo en segundos: 900 por defecto, de 60 a +3600. Cada objeto debe llegar dentro de la mitad de esa duración, así que +aumente el valor para objetos grandes. + +El comando informa uno de tres resultados: + +| Resultado | Código de salida | Significado | +| --- | --- | --- | +| `verified` | 0 | El archivo está completo. | +| `incomplete` | 1 | No se escribió ningún recibo. Ejecute de nuevo el mismo comando para reanudar. | +| `refused` | 2 | No se copió nada. La ejecución está abierta, depurada u ocultada, su historial tiene un hueco de secuencia, o contiene una referencia que el transporte del runtime no puede obtener. | + +Otras copias de seguridad usan el mismo bloqueo, así que una copia se rechaza +con HTTP 409 (código de salida 2) mientras otra lo mantiene; vuelva a +intentarlo más tarde. Un token sin permisos de administrador recibe HTTP 403 +(código de salida 4) y no se copia nada. Un Server sin la ruta del bloqueo de +copia de seguridad, o un `--hold-ttl` no válido, termina con el código 1. Los +demás errores de conexión, autenticación y Server conservan sus códigos de +salida habituales. + +`dw workflow:history-archive-check ` no necesita un Server. Vuelve a +leer cada fichero e informa `verified`, `incomplete` con un hallazgo codificado +por cada comprobación fallida, o `refused`. + +Server native 3.30.0 solo añade un verificador sin conexión, +`durable-workflow-server history-archive verify `, que +`dw workflow:history-archive` no necesita. El verificador solo +lee el directorio, imprime el informe JSON y termina con 0 solo cuando el +resultado es `verified`. + +Un archivo cubre solo la ejecución seleccionada. No es una copia de seguridad +de la base de datos. Se escribe sin cifrar y su vida útil es responsabilidad de +la aplicación. El formato, el alcance y los códigos de hallazgo están en la +[guía de archivos de historial](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) +del Server. + ## Inspección de llamadas a servicios {#service-call-inspection} Utiliza `dw service-call:describe ` para inspeccionar una llamada Nexus duradera en el espacio del endpoint. Por ejemplo, `dw service-call:describe billing invoices create call-42 --namespace=shared --json` devuelve la respuesta completa de Server. diff --git a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server.md b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server.md index e367f657c58..f6741100d9b 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server.md @@ -362,7 +362,7 @@ Para conservar un registro más allá de la ventana acotada de 1 a 365 días, el La depuración elimina el historial, los detalles relacionados y las cargas externas elegibles. Una ampliación posterior de la política no puede recuperarlos. La [guía de depuración integrada](../configuration/pruning-workflows.md) describe un proceso separado controlado por la aplicación; su API de limpieza no aplica la política de retención por namespace de Server. Para otro runtime, confirme su comportamiento antes de aplicar este procedimiento de PHP Server. -Las exportaciones actuales conservan referencias externas, no copias independientes de sus objetos. La función de archivado autosuficiente verificado se solicita en [Server #520](https://github.com/durable-workflow/server/issues/520); exportar y calcular una suma no la proporciona. Rechace también el historial ya depurado en lugar de confiar en su marca `history_complete`: el caso conocido de falsa completitud sigue abierto en [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). +Una exportación del historial conserva referencias externas, no copias independientes de sus objetos. En el Server native 3.0.3 o posterior, `dw workflow:history-archive` (dw 2.13.0 o posterior, credencial de administrador) escribe un archivo autosuficiente verificado. Contiene la exportación, los bytes exactos de cada objeto externo que esta referencia, un manifiesto con sus resúmenes y un recibo. El archivo sigue siendo legible después de que la retención depure la ejecución, y también sin el Server ni su almacén de cargas. Consulte los [comandos de archivo de historial](./cli-reference.md#history-archives) y la [guía del formato de archivo](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) del Server. Server native 3.30.0 solo añade el verificador sin conexión `durable-workflow-server history-archive verify`. Rechace también el historial ya depurado en lugar de confiar en su marca `history_complete`: el caso conocido de falsa completitud sigue abierto en [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). ### Namespaces {#namespaces} diff --git a/i18n/es/source-hashes.json b/i18n/es/source-hashes.json index caa754f7a02..3e58ba988e9 100644 --- a/i18n/es/source-hashes.json +++ b/i18n/es/source-hashes.json @@ -10,7 +10,7 @@ "configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a", "configuration/microservices.md": "7421f8f18b62bc326601e2670ba15ba45fb02056da0d70e94ef89b3870f79cb0", "configuration/options.md": "d5079c5059aaa1072693ac09b3b8ea2be9176279820459370e5ebe6660d9f43b", - "configuration/pruning-workflows.md": "6f6ee2be3bd185ffec764e86c3ed3cbd40c45f75d28671b4cd11226493e11afb", + "configuration/pruning-workflows.md": "13b314e3da5446788691cfc5801be68591fb11c9b8a7605ef58946692d7062ae", "configuration/publishing-config.md": "3c84a87186db1eec8f59d25b81e6018ffabe3afb8ce2bb5011e66fccabb3221d", "constraints/activity-constraints.md": "5a953d0e95e750b6c02d1c72b72199fb3ff4687540cebc56aa3b216cf667bb05", "constraints/constraints-summary.md": "fb48d01502388fc3821eae3790f470ed29cec91545420450f96fc77b84e589f1", @@ -38,7 +38,7 @@ "features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e", "features/continue-as-new.md": "e77725263167c3f64eac639ea43b83722a1c722804062562ab081bae5ef8c354", "features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b", - "features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898", + "features/external-payload-storage.md": "5b5e35b99ef4d37cf02dcd01a0099a612b19ec04b50a00275fd742c739f836a7", "features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365", "features/local-activities.md": "05fca8f2104d8f4e7bd8b48040f5615f18d0ee2795922fb65c56f8d3d70ed204", "features/memo.md": "e1bb34216febf112c0d9151b8a57e31cc2de17b4bf16980812da01c0e1c17f15", @@ -66,13 +66,13 @@ "mcp-workflows.md": "1c0b5bb7f2e5c7ca835dfdfa57bbe8f6624172c855f4e225057ac2377abf360e", "migration.md": "7304a53786d5e45d3a639c33386e6558e855ee77982883a5e051ef5084b8453b", "monitoring.md": "a64e6b94bb67ffc5c43d8030f18582f96c3d170e8b2bedaa83f280d45c98bbaf", - "operator-operating-envelope.md": "dc0cf13d8593e4ce2d8ec1912e45e61c9bf13f06abf7cc8c422379db5e3fa0ad", + "operator-operating-envelope.md": "516502ae2b2d0e574fb8b4fe3a2d5a187e5f07f3d041a1ab2053c5167503e213", "platform-conformance.md": "2eec7eba9a65c010e03c4b2eb78afe4dddd6fd8170218b3194c49e3777124c91", "platform-protocol-specs.md": "ba9c69adfca7fb4a0dd982464b0ca69dd5a21de1e340edbe23b075ec0fb0c35c", "polyglot/avro-value-protocol.md": "602e66c6288c1dd69d2b400c64e4739ad3a0493b5be269cee40f7848b11f260a", "polyglot/cancellation.md": "f676cd3ddb39246a0f580a1e16c83bc36d2ed9458b9e6009af4cc192d299ac62", "polyglot/cli-python-parity.md": "50f9da7fc410f1046328b35333feb3c123e7007316b5ce5b07f88404537ae36f", - "polyglot/cli-reference.md": "9028b697b8d41abdbf5d8d1d929aff656b905e2742b1c923dc21feea7df3fc7d", + "polyglot/cli-reference.md": "33f06968034324ed9813b1d7187fa2dccb689353616e59c6733e033ea285f0fe", "polyglot/cli.mdx": "dd4085314000b01ef1addf1686d287cfa2c1207797cb1126bc7cf44751daade1", "polyglot/cloud-control-plane.md": "9dc0b85e5ea41d59e55a8d12bef7b2dcafe69d9c499fb1305f58fde7a28d3e07", "polyglot/database-support.md": "518f679ae723ae4d39db7cac78008bc8edb84a6cfba2e6c668d8f2be5d378d03", @@ -93,7 +93,7 @@ "polyglot/server-api-reference.md": "dab6924c622276373f69185295cb78b19a3a1c531db304e5106d0f02fdfe987c", "polyglot/server-config-reference.md": "36ecbb5b76246f9c8e434b79745c3fef3265d0606aae486247064e23e7a6bb64", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", - "polyglot/server.md": "599367e6efc4819ec013114318e207cac9d54a02a74f434482f4c17595f201b3", + "polyglot/server.md": "4ae391d98cc7d2d698c9800a382ccc9a5767780bfcb12ebf7436a312a636262f", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", "polyglot/task-matching-dispatch.md": "9c8ffbbee16b5da48e7882721d7ba8eac209a374a6ca766d93d2b17e825b203d", "polyglot/task-queue-admission.md": "efcf934876a27c153dd3ecd1a995e7c08b37452c79dfcbba1ae7fa0a8cbad327", diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md b/i18n/fr/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md index e486e6243b9..9ba90ddba9d 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md @@ -39,7 +39,7 @@ Les exemples ont été vérifiés avec PHP Server **2.9.5** publié, son Workflo 5. **Préservez les objets externes.** L’export conserve les enveloppes de référence externes, pas une copie indépendante de chaque objet référencé. Conservez ces octets pendant toute la durée de vie de l’export et testez leur récupération sans cache chaud. Suivez le [cycle de vie des payloads externes](../features/external-payload-storage.md#replay-retention-and-cleanup). 6. **Réconciliez avant suppression.** Comparez l’inventaire des runs fermés aux copies vérifiées à destination. Déclenchez une alerte pour les identifiants manquants, les échecs de vérification et un retard d’export proche de l’échéance. N’avancez le point de contrôle qu’une fois chaque candidat comptabilisé. Réexaminez des fenêtres de fermeture qui se chevauchent et dédupliquez par namespace et identifiant de run. Ne remplacez pas un bundle complet vérifié par un export ultérieur incomplet. -Ces étapes appartiennent à l’application ; ce ne sont pas une opération d’archivage autonome prise en charge par le produit. [Server #520](https://github.com/durable-workflow/server/issues/520) suit la fonction manquante de copie, de rétention et de vérification à froid de tous les octets externes nécessaires. Un export réussi contenant uniquement des références ou une somme de contrôle manuelle ne satisfait pas cette exigence. +Ces étapes appartiennent à l’application pour les exports intégrés. Un export intégré conserve des références vers les payloads externes : un export ou une somme de contrôle réussis ne préservent donc pas les octets externes. Sur Server native 3.0.3 ou ultérieur, `dw` 2.13.0 ou ultérieur, avec un identifiant administrateur, écrit à la place une [archive d’historique autonome vérifiée](../polyglot/cli-reference.md#history-archives). Cette archive copie chaque objet externe référencé sous le verrou de sauvegarde du Server, puis vérifie les octets à froid. :::warning Sans copie de récupération, la suppression est irréversible diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/features/external-payload-storage.md b/i18n/fr/docusaurus-plugin-content-docs/current/features/external-payload-storage.md index a81a55140c5..e39db5fe296 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/features/external-payload-storage.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/features/external-payload-storage.md @@ -71,7 +71,7 @@ Gardez une marge sous les limites ordinaires de requête et de charge utile. Le - **Intégrité de la relecture.** Une valeur n’est décodée qu’après récupération et vérification des octets référencés. Préservez les objets encore nécessaires à chaque exécution conservée. - **Cache des lectures vérifiées.** `ExternalPayloadStorage` borne son cache d’octets vérifiés. Le vider ne supprime pas l’objet et ne change pas son propriétaire. - **Rétention.** Le nettoyage du runtime tient compte des propriétaires conservés et objets partagés. Les défaillances du stockage, blocages de sauvegarde ou références restantes peuvent retarder la suppression. L’exécution de la rétention ne garantit pas l’absence d’objets orphelins. -- **Export de l’historique.** Un export peut conserver les métadonnées des références sans récupérer l’objet. Sa somme de contrôle ou `history_complete` ne prouve ni la présence des octets externes ni la possibilité de rejouer l’archive. Respectez la [frontière de sauvegarde et restauration](../configuration/pruning-workflows.md#export-before-pruning) et vérifiez les objets séparément. Les archives autonomes restent suivies dans [Server #520](https://github.com/durable-workflow/server/issues/520). +- **Export de l’historique.** Un export peut conserver les métadonnées des références sans récupérer l’objet. Sa somme de contrôle ou `history_complete` ne prouve ni la présence des octets externes ni la possibilité de rejouer l’archive. Respectez la [frontière de sauvegarde et restauration](../configuration/pruning-workflows.md#export-before-pruning) et vérifiez les objets séparément. Les exports intégrés restent limités aux références. Sur Server native, `dw workflow:history-archive` copie les octets dans une [archive autonome vérifiée](../polyglot/cli-reference.md#history-archives). ## Utilisation depuis le code {#using-it-from-code} diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/operator-operating-envelope.md b/i18n/fr/docusaurus-plugin-content-docs/current/operator-operating-envelope.md index 3fb9344e1bc..41d6ee076ad 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/operator-operating-envelope.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/operator-operating-envelope.md @@ -392,7 +392,7 @@ Utilisez cette séquence de vérification : Les routes correspondantes figurent dans la [référence API opérateur Waterline](./waterline-operator-api.md). -Les contrôles de somme et de structure ne prouvent pas qu’un export contient tous les événements d’origine ou des octets externes indépendants. Refusez les sources déjà nettoyées : le faux indicateur d’export complet reste un défaut ouvert dans [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Cette procédure manuelle ne fournit pas non plus l’opération d’archive autonome vérifiée demandée dans [Server #520](https://github.com/durable-workflow/server/issues/520). Distinguez ces lacunes du produit des contrôles de récupération réellement réussis par votre déploiement. +Les contrôles de somme et de structure ne prouvent pas qu’un export contient tous les événements d’origine ou des octets externes indépendants. Refusez les sources déjà nettoyées : le faux indicateur d’export complet reste un défaut ouvert dans [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Cette procédure manuelle ne produit pas non plus d’archive autonome. Sur Server native, utilisez pour cela `dw workflow:history-archive` ([commandes d’archive d’historique](./polyglot/cli-reference.md#history-archives)). Distinguez cette lacune du produit des contrôles de récupération réellement réussis par votre déploiement. ## Contrat de sauvegarde et de récupération {#backup-restore-and-disaster-recovery-contract} diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md index a4a75cbf025..a533fd6ba77 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md @@ -236,7 +236,9 @@ l'environnement du runtime plutôt que dans le fichier de profil. | `dw workflow:list-runs ` | Lister les exécutions d'une instance de workflow. | `--json` | | `dw workflow:show-run ` | Afficher une exécution. | `--follow`, `--json` | | `dw workflow:history ` | Lire les événements de l'historique d'une exécution. | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | Exporter la charge utile d'archivage de l'historique d'exécution. | `--output-file`, options globales | +| `dw workflow:history-export ` | Exporter le bundle de l'historique d'exécution. Les payloads externes restent des références. | `--output-file`, options globales | +| `dw workflow:history-archive ` | Écrire une archive autonome vérifiée d'une exécution fermée, y compris les octets de chaque payload externe (Server native). | `--hold-ttl`, `--json`, options globales | +| `dw workflow:history-archive-check ` | Vérifier une archive d'historique à partir de ses seuls fichiers. | `--json` | | `dw workflow:signal ` | Envoyer un signal. | `--request-id`, `--run-id`, options d'entrée, `--json` | | `dw workflow:query ` | Exécuter une requête de lecture de workflow. | `--run-id`, options d'entrée, `--json` | | `dw workflow:update ` | Soumettre ou exécuter une mise à jour de workflow. | `--wait=accepted\|completed`, `--request-id`, `--run-id`, options d'entrée, `--json` | @@ -321,6 +323,67 @@ supprimé donne le code 5, ce qui ne prouve pas que la mise à jour n'a jamais acceptée. Un Server sans cette capacité, dont PHP Server 2.x, donne le code 8 avant l'envoi d'une requête de résultat. +### Archives d'historique {#history-archives} + +`dw workflow:history-archive` (dw 2.13.0 ou ultérieur, Server native +3.0.3 ou ultérieur, identifiant administrateur) écrit une exécution +fermée dans un répertoire. La commande utilise les routes du Server pour +l'export d'historique, la récupération des payloads externes et le verrou de +sauvegarde. Le répertoire contient l'export d'historique du +Server, les octets exacts de chaque payload externe référencé par l'export, un +`manifest.json` indiquant le codec, la longueur et le SHA-256 de chaque objet, +et un `receipt.json`. + +La copie se déroule ainsi : + +1. dw acquiert le verrou de sauvegarde des payloads externes du Server, afin + qu'aucun payload ne soit supprimé pendant la copie. +2. dw récupère chaque objet une seule fois et vérifie sa longueur et son + empreinte. +3. dw vérifie l'ensemble du répertoire depuis le disque. +4. dw confirme que le verrou n'a jamais expiré. +5. Alors seulement, dw écrit le reçu. + +Le verrou est libéré dans tous les cas. Cela inclut Ctrl-C (code de sortie 130) +et, sous Unix, SIGTERM (code de sortie 143). Aucun reçu n'est écrit après un +signal. + +`--hold-ttl` fixe la durée du verrou en secondes : 900 par défaut, de 60 à 3600. +Chaque objet doit arriver dans la moitié de cette durée ; augmentez-la donc pour +les gros objets. + +La commande signale l'un des trois résultats suivants : + +| Résultat | Code de sortie | Signification | +| --- | --- | --- | +| `verified` | 0 | L'archive est complète. | +| `incomplete` | 1 | Aucun reçu n'a été écrit. Relancez la même commande pour reprendre. | +| `refused` | 2 | Rien n'a été copié. L'exécution est ouverte, nettoyée ou occultée, son historique présente un trou de séquence, ou elle contient une référence que le transport d'exécution ne peut pas récupérer. | + +D'autres sauvegardes utilisent le même verrou : une copie est donc refusée avec +HTTP 409 (code de sortie 2) tant qu'une autre le détient ; réessayez plus tard. +Un jeton sans droits d'administrateur reçoit HTTP 403 (code de sortie 4), et +rien n'est copié. Un Server sans la route du verrou de sauvegarde, ou une valeur +`--hold-ttl` invalide, termine avec le code 1. Les autres erreurs de connexion, +d'authentification et du Server conservent leurs codes de sortie habituels. + +`dw workflow:history-archive-check ` ne nécessite aucun Server. Cette +commande relit chaque fichier et signale `verified`, `incomplete` avec un +constat codé pour chaque contrôle échoué, ou `refused`. + +Server native 3.30.0 ajoute seulement un vérificateur hors ligne, +`durable-workflow-server history-archive verify `, dont +`dw workflow:history-archive` n'a pas besoin. Ce vérificateur ne +lit que le répertoire, affiche le rapport JSON et ne se termine avec 0 que si +le résultat est `verified`. + +Une archive ne couvre que l'exécution sélectionnée. Ce n'est pas une sauvegarde +de base de données. Elle est écrite sans chiffrement et sa durée de vie relève +de l'application. Le format, le périmètre et les codes de constat sont décrits +dans le +[guide des archives d'historique](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) +du Server. + ## Inspection des appels de service {#service-call-inspection} Utilisez `dw service-call:describe ` diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server.md b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server.md index 164c27317d1..4d6495b153a 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server.md @@ -362,7 +362,7 @@ Pour conserver plus longtemps que 1 à 365 jours, choisissez entre l’historiqu Le nettoyage supprime historique, détails associés et payloads externes éligibles. Allonger la politique ensuite ne les récupère pas. Le [guide de nettoyage intégré](../configuration/pruning-workflows.md) décrit un processus distinct, géré par l’application, dont l’API n’applique pas la politique de namespace Server. Pour un autre runtime, vérifiez sa rétention avant d’appliquer cette procédure PHP. -Les exports actuels préservent les références externes, pas une copie indépendante de leurs objets. Le processus d’archive autonome vérifiée est demandé dans [Server #520](https://github.com/durable-workflow/server/issues/520) ; un export et sa somme de contrôle ne le fournissent pas. Refusez aussi les historiques déjà nettoyés plutôt que de faire confiance à leur indicateur `history_complete` : le cas connu de fausse complétude reste ouvert dans [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). +Un export d’historique préserve les références externes, pas une copie indépendante de leurs objets. Sur Server native 3.0.3 ou ultérieur, `dw workflow:history-archive` (dw 2.13.0 ou ultérieur, identifiant administrateur) écrit une archive autonome vérifiée. Elle contient l’export, les octets exacts de chaque objet externe qu’il référence, un manifeste de leurs empreintes et un reçu. L’archive reste lisible après que la rétention a nettoyé le run, et sans le Server ni son stockage de payloads. Consultez les [commandes d’archive d’historique](./cli-reference.md#history-archives) et le [guide du format d’archive](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) du Server. Server native 3.30.0 ajoute seulement le vérificateur hors ligne `durable-workflow-server history-archive verify`. Refusez aussi les historiques déjà nettoyés plutôt que de faire confiance à leur indicateur `history_complete` : le cas connu de fausse complétude reste ouvert dans [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). ### Espaces de noms {#namespaces} diff --git a/i18n/fr/source-hashes.json b/i18n/fr/source-hashes.json index caa754f7a02..3e58ba988e9 100644 --- a/i18n/fr/source-hashes.json +++ b/i18n/fr/source-hashes.json @@ -10,7 +10,7 @@ "configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a", "configuration/microservices.md": "7421f8f18b62bc326601e2670ba15ba45fb02056da0d70e94ef89b3870f79cb0", "configuration/options.md": "d5079c5059aaa1072693ac09b3b8ea2be9176279820459370e5ebe6660d9f43b", - "configuration/pruning-workflows.md": "6f6ee2be3bd185ffec764e86c3ed3cbd40c45f75d28671b4cd11226493e11afb", + "configuration/pruning-workflows.md": "13b314e3da5446788691cfc5801be68591fb11c9b8a7605ef58946692d7062ae", "configuration/publishing-config.md": "3c84a87186db1eec8f59d25b81e6018ffabe3afb8ce2bb5011e66fccabb3221d", "constraints/activity-constraints.md": "5a953d0e95e750b6c02d1c72b72199fb3ff4687540cebc56aa3b216cf667bb05", "constraints/constraints-summary.md": "fb48d01502388fc3821eae3790f470ed29cec91545420450f96fc77b84e589f1", @@ -38,7 +38,7 @@ "features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e", "features/continue-as-new.md": "e77725263167c3f64eac639ea43b83722a1c722804062562ab081bae5ef8c354", "features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b", - "features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898", + "features/external-payload-storage.md": "5b5e35b99ef4d37cf02dcd01a0099a612b19ec04b50a00275fd742c739f836a7", "features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365", "features/local-activities.md": "05fca8f2104d8f4e7bd8b48040f5615f18d0ee2795922fb65c56f8d3d70ed204", "features/memo.md": "e1bb34216febf112c0d9151b8a57e31cc2de17b4bf16980812da01c0e1c17f15", @@ -66,13 +66,13 @@ "mcp-workflows.md": "1c0b5bb7f2e5c7ca835dfdfa57bbe8f6624172c855f4e225057ac2377abf360e", "migration.md": "7304a53786d5e45d3a639c33386e6558e855ee77982883a5e051ef5084b8453b", "monitoring.md": "a64e6b94bb67ffc5c43d8030f18582f96c3d170e8b2bedaa83f280d45c98bbaf", - "operator-operating-envelope.md": "dc0cf13d8593e4ce2d8ec1912e45e61c9bf13f06abf7cc8c422379db5e3fa0ad", + "operator-operating-envelope.md": "516502ae2b2d0e574fb8b4fe3a2d5a187e5f07f3d041a1ab2053c5167503e213", "platform-conformance.md": "2eec7eba9a65c010e03c4b2eb78afe4dddd6fd8170218b3194c49e3777124c91", "platform-protocol-specs.md": "ba9c69adfca7fb4a0dd982464b0ca69dd5a21de1e340edbe23b075ec0fb0c35c", "polyglot/avro-value-protocol.md": "602e66c6288c1dd69d2b400c64e4739ad3a0493b5be269cee40f7848b11f260a", "polyglot/cancellation.md": "f676cd3ddb39246a0f580a1e16c83bc36d2ed9458b9e6009af4cc192d299ac62", "polyglot/cli-python-parity.md": "50f9da7fc410f1046328b35333feb3c123e7007316b5ce5b07f88404537ae36f", - "polyglot/cli-reference.md": "9028b697b8d41abdbf5d8d1d929aff656b905e2742b1c923dc21feea7df3fc7d", + "polyglot/cli-reference.md": "33f06968034324ed9813b1d7187fa2dccb689353616e59c6733e033ea285f0fe", "polyglot/cli.mdx": "dd4085314000b01ef1addf1686d287cfa2c1207797cb1126bc7cf44751daade1", "polyglot/cloud-control-plane.md": "9dc0b85e5ea41d59e55a8d12bef7b2dcafe69d9c499fb1305f58fde7a28d3e07", "polyglot/database-support.md": "518f679ae723ae4d39db7cac78008bc8edb84a6cfba2e6c668d8f2be5d378d03", @@ -93,7 +93,7 @@ "polyglot/server-api-reference.md": "dab6924c622276373f69185295cb78b19a3a1c531db304e5106d0f02fdfe987c", "polyglot/server-config-reference.md": "36ecbb5b76246f9c8e434b79745c3fef3265d0606aae486247064e23e7a6bb64", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", - "polyglot/server.md": "599367e6efc4819ec013114318e207cac9d54a02a74f434482f4c17595f201b3", + "polyglot/server.md": "4ae391d98cc7d2d698c9800a382ccc9a5767780bfcb12ebf7436a312a636262f", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", "polyglot/task-matching-dispatch.md": "9c8ffbbee16b5da48e7882721d7ba8eac209a374a6ca766d93d2b17e825b203d", "polyglot/task-queue-admission.md": "efcf934876a27c153dd3ecd1a995e7c08b37452c79dfcbba1ae7fa0a8cbad327", diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md b/i18n/ja/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md index e74b6c99d76..37509d56023 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md @@ -37,7 +37,7 @@ Server には Namespace 単位の別の保持ポリシーがあり、自動削 5. **外部のバイト列を保持する。** エクスポートには外部参照のエンベロープがあり、参照先すべての独立したコピーがあるわけではありません。エクスポートの寿命に合わせて実体を保存し、温まった runtime キャッシュを使わずに取得を試してください。[外部ペイロードのライフサイクル](../features/external-payload-storage.md#replay-retention-and-cleanup)に従います。 6. **削除前に照合する。** 閉じた実行の一覧と保存先の検証済み記録を照合します。不足する実行 ID、検証失敗、保持期限に近づく滞留を通知します。全候補を確認してからチェックポイントを進めます。終了時刻の範囲を重ねて再走査し、Namespace と実行 ID で重複排除します。後の不完全なエクスポートで検証済みの完全なバンドルを上書きしないでください。 -これらはアプリケーションが担当する手順であり、製品がサポートする自己完結型アーカイブ操作ではありません。[Server #520](https://github.com/durable-workflow/server/issues/520) は、必要な外部バイトをすべてコピー、保持し、コールド検証する未提供の製品機能を追跡しています。参照だけのエクスポートや手動のチェックサム確認が成功しても、その要件を満たしたことにはなりません。 +これらは組み込みエクスポートでアプリケーションが担当する手順です。組み込みエクスポートは外部ペイロードへの参照を保持するため、エクスポートやチェックサム確認が成功しても外部バイトは保存されません。native Server 3.0.3 以降では、管理者資格情報を使う `dw` 2.13.0 以降が代わりに[自己完結型の検証済み履歴アーカイブ](../polyglot/cli-reference.md#history-archives)を書き出します。このアーカイブは、Server のバックアップホールドの下で参照先の外部オブジェクトをすべてコピーし、その後バイトをコールド検証します。 :::warning 復旧コピーなしの削除は取り消せません diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/features/external-payload-storage.md b/i18n/ja/docusaurus-plugin-content-docs/current/features/external-payload-storage.md index bf9e1eaba09..766794d0c3e 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/features/external-payload-storage.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/features/external-payload-storage.md @@ -71,7 +71,7 @@ Server 自体がローカルストレージを使っていても、リモート - **リプレイの整合性。** 参照先のバイトを取得、検証してから値をデコードします。保持対象の実行が必要とするオブジェクトを残してください。 - **検証済み取得のキャッシュ。** `ExternalPayloadStorage` は検証済みバイトのキャッシュを制限します。キャッシュを消しても保存オブジェクトの削除や所有権変更は起きません。 - **保持。** ランタイムのクリーンアップは、保持中の所有者と共有オブジェクトを考慮します。ストレージ障害、バックアップ保留、残存参照で削除が遅れることがあります。保持処理の稼働は孤立オブジェクトがないという保証ではありません。 -- **履歴のエクスポート。** エクスポートは、オブジェクトを取得せず参照メタデータを保存できます。チェックサムや `history_complete` は、外部バイトの存在やアーカイブのリプレイ可能性を証明しません。[バックアップと復元の境界](../configuration/pruning-workflows.md#export-before-pruning)に従い、オブジェクトを別途検証してください。自己完結型アーカイブは [Server #520](https://github.com/durable-workflow/server/issues/520) で継続追跡しています。 +- **履歴のエクスポート。** エクスポートは、オブジェクトを取得せず参照メタデータを保存できます。チェックサムや `history_complete` は、外部バイトの存在やアーカイブのリプレイ可能性を証明しません。[バックアップと復元の境界](../configuration/pruning-workflows.md#export-before-pruning)に従い、オブジェクトを別途検証してください。組み込みエクスポートは参照のみのままです。native Server では、`dw workflow:history-archive` がバイトを[自己完結型の検証済みアーカイブ](../polyglot/cli-reference.md#history-archives)にコピーします。 ## コードからの利用 {#using-it-from-code} diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/operator-operating-envelope.md b/i18n/ja/docusaurus-plugin-content-docs/current/operator-operating-envelope.md index cf55717fa24..aeddb43c77c 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/operator-operating-envelope.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/operator-operating-envelope.md @@ -395,7 +395,7 @@ Workflow 2.6.3 以降では `details_pruned_at` がある実行は、summary 欠 Waterline の対応ルートは [Waterline 運用 API リファレンス](./waterline-operator-api.md)を参照してください。 -チェックサムと構造の確認では、すべての元イベントや独立した外部バイトがエクスポートに含まれることは証明できません。削除済みのソースは拒否してください。誤った完全エクスポートフラグは、[Workflow #856](https://github.com/durable-workflow/workflow/issues/856) で未解決の不具合です。この手動手順は、[Server #520](https://github.com/durable-workflow/server/issues/520) が要求する自己完結型の検証済みアーカイブ操作も提供しません。これらの製品の不足と、実際にデプロイ環境が合格した復旧確認を区別してください。 +チェックサムと構造の確認では、すべての元イベントや独立した外部バイトがエクスポートに含まれることは証明できません。削除済みのソースは拒否してください。誤った完全エクスポートフラグは、[Workflow #856](https://github.com/durable-workflow/workflow/issues/856) で未解決の不具合です。この手動手順では自己完結型アーカイブも作成されません。native Server では、そのために `dw workflow:history-archive`([履歴アーカイブのコマンド](./polyglot/cli-reference.md#history-archives))を使用してください。この製品の不足と、実際にデプロイ環境が合格した復旧確認を区別してください。 ## バックアップ、復元、災害復旧の契約 {#backup-restore-and-disaster-recovery-contract} diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md index a56ba60e300..9cc10c5522b 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md @@ -148,7 +148,9 @@ dw server:info --output=json \ | `dw workflow:list-runs ` | インスタンスの実行を一覧。 | `--json` | | `dw workflow:show-run ` | 1実行を表示。 | `--follow`, `--json` | | `dw workflow:history ` | 実行の履歴イベントを読む。 | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | アーカイブ用実行履歴ペイロードをエクスポート。 | `--output-file`、グローバルオプション | +| `dw workflow:history-export ` | 実行履歴バンドルをエクスポート。外部ペイロードは参照のまま。 | `--output-file`、グローバルオプション | +| `dw workflow:history-archive ` | 閉じた実行の自己完結型の検証済みアーカイブを、すべての外部ペイロードのバイトを含めて書き出す(native Server)。 | `--hold-ttl`、`--json`、グローバルオプション | +| `dw workflow:history-archive-check ` | 履歴アーカイブをそのファイルだけで検証。 | `--json` | | `dw workflow:signal ` | シグナルを送信。 | `--request-id`、`--run-id`、入力オプション、`--json` | | `dw workflow:query ` | 読み取り専用クエリを実行。 | `--run-id`、入力オプション、`--json` | | `dw workflow:update ` | 更新を送信または実行。 | `--wait=accepted\|completed`, `--request-id`、`--run-id`、入力オプション、`--json` | @@ -204,6 +206,38 @@ dw workflow:update-outcome order-123 "$UPDATE_ID" --wait=completed --wait-timeou `--wait-timeout` には `--wait=completed` と 1 秒以上の整数が必要です。失敗した更新は終了コード 2 を返します。不明または削除済みの更新 ID は 5 を返しますが、更新が一度も受け付けられなかったことを意味しません。PHP Server 2.x など、この機能を持たない Server では、結果のリクエストを送る前に 8 で終了します。 +### 履歴アーカイブ {#history-archives} + +`dw workflow:history-archive`(dw 2.13.0 以降、native Server 3.0.3 以降、管理者資格情報が必要)は、閉じた実行を一つディレクトリに書き出します。このコマンドは Server の履歴エクスポート、外部ペイロード取得、バックアップホールドのルートを使用します。ディレクトリには、Server の履歴エクスポート、エクスポートが参照するすべての外部ペイロードの正確なバイト、各オブジェクトのコーデック・長さ・SHA-256 を記した `manifest.json`、および `receipt.json` が含まれます。 + +コピーは次の順に進みます。 + +1. dw は Server の外部ペイロードのバックアップホールドを取得し、コピー中にペイロードが回収されないようにします。 +2. dw は各オブジェクトを一度だけ取得し、長さとダイジェストを確認します。 +3. dw はディスク上のディレクトリ全体を検証します。 +4. dw はホールドが一度も失効していないことを確認します。 +5. その後に初めて、dw はレシートを書き込みます。 + +ホールドはどの経路でも解放されます。Ctrl-C の場合(終了コード 130)や、Unix での SIGTERM の場合(終了コード 143)も同様です。シグナルの後にレシートが書き込まれることはありません。 + +`--hold-ttl` はホールドのリース期間を秒単位で指定します。既定値は 900 で、60 から 3600 の範囲で指定できます。各オブジェクトはリース期間の半分以内に届く必要があるため、大きなオブジェクトでは値を増やしてください。 + +コマンドは次の三つの結果のいずれかを報告します。 + +| 結果 | 終了コード | 意味 | +| --- | --- | --- | +| `verified` | 0 | アーカイブは完全です。 | +| `incomplete` | 1 | レシートは書き込まれていません。同じコマンドを再実行すると再開します。 | +| `refused` | 2 | 何もコピーされていません。実行が開いている、削除済み、または秘匿化されている、履歴のシーケンスに欠落がある、またはランタイム転送で取得できない参照を含んでいます。 | + +ほかのバックアップも同じホールドを使うため、別のバックアップがホールドを保持している間、コピーは HTTP 409(終了コード 2)で拒否されます。時間をおいて再試行してください。管理者以外のトークンは HTTP 403(終了コード 4)を受け取り、何もコピーされません。バックアップホールドのルートを持たない Server、または無効な `--hold-ttl` では終了コード 1 になります。その他の接続、認証、Server のエラーは通常の終了コードのままです。 + +`dw workflow:history-archive-check ` は Server を必要としません。すべてのファイルを読み戻し、`verified`、失敗した確認ごとにコード付きの所見を伴う `incomplete`、または `refused` を報告します。 + +native Server 3.30.0 が追加するのは、オフライン検証コマンド `durable-workflow-server history-archive verify ` だけで、`dw workflow:history-archive` はこれを必要としません。この検証コマンドはディレクトリだけを読み取り、JSON レポートを出力し、結果が `verified` の場合にのみ終了コード 0 で終了します。 + +アーカイブは選択した実行だけを対象とし、データベースのバックアップではありません。暗号化せずに書き出され、その保存期間はアプリケーションが管理します。形式、対象範囲、所見コードは Server の[履歴アーカイブガイド](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md)にあります。 + ## サービス呼び出しの検査 {#service-call-inspection} エンドポイントの名前空間の永続 Nexus 呼び出しを1件検査するには `dw service-call:describe ` を使います。たとえば `dw service-call:describe billing invoices create call-42 --namespace=shared --json` は完全な Server レスポンスを返します。 diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server.md b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server.md index 6487cf5b883..a97ab0d1aca 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server.md @@ -352,7 +352,7 @@ PHP Server に `run_ids` を指定すると、有限保持期間より新しい 削除は履歴、関連詳細、削除可能な外部ペイロードを取り除きます。後から期間を延長しても復元できません。[組み込みの削除ガイド](../configuration/pruning-workflows.md)はアプリケーション管理の別の処理で、その API は Server の Namespace 保持設定を適用しません。他の runtime には、PHP Server の手順を使う前に保持動作を確認してください。 -現在の履歴エクスポートは外部参照を保持しますが、そのオブジェクトの独立したコピーは作りません。自己完結型の検証済みアーカイブフローは [Server #520](https://github.com/durable-workflow/server/issues/520) で要求されており、エクスポートとチェックサムだけでは提供されません。また、削除済み履歴の `history_complete` フラグを信頼せず拒否してください。既知の誤った完全性の問題は [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) で未解決のままです。 +履歴エクスポートは外部参照を保持しますが、そのオブジェクトの独立したコピーは作りません。native Server 3.0.3 以降では、`dw workflow:history-archive`(dw 2.13.0 以降、管理者資格情報が必要)が自己完結型の検証済みアーカイブを書き出します。アーカイブには、エクスポート、エクスポートが参照するすべての外部オブジェクトの正確なバイト、それらのダイジェストを記したマニフェスト、レシートが含まれます。アーカイブは、保持期間によって実行が削除された後も、Server やそのペイロードストアがなくても読み取れます。[履歴アーカイブのコマンド](./cli-reference.md#history-archives)と Server の[アーカイブ形式ガイド](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md)を参照してください。native Server 3.30.0 が追加するのは、オフライン検証コマンド `durable-workflow-server history-archive verify` だけです。また、削除済み履歴の `history_complete` フラグを信頼せず拒否してください。既知の誤った完全性の問題は [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) で未解決のままです。 ### Namespace {#namespaces} diff --git a/i18n/ja/source-hashes.json b/i18n/ja/source-hashes.json index caa754f7a02..3e58ba988e9 100644 --- a/i18n/ja/source-hashes.json +++ b/i18n/ja/source-hashes.json @@ -10,7 +10,7 @@ "configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a", "configuration/microservices.md": "7421f8f18b62bc326601e2670ba15ba45fb02056da0d70e94ef89b3870f79cb0", "configuration/options.md": "d5079c5059aaa1072693ac09b3b8ea2be9176279820459370e5ebe6660d9f43b", - "configuration/pruning-workflows.md": "6f6ee2be3bd185ffec764e86c3ed3cbd40c45f75d28671b4cd11226493e11afb", + "configuration/pruning-workflows.md": "13b314e3da5446788691cfc5801be68591fb11c9b8a7605ef58946692d7062ae", "configuration/publishing-config.md": "3c84a87186db1eec8f59d25b81e6018ffabe3afb8ce2bb5011e66fccabb3221d", "constraints/activity-constraints.md": "5a953d0e95e750b6c02d1c72b72199fb3ff4687540cebc56aa3b216cf667bb05", "constraints/constraints-summary.md": "fb48d01502388fc3821eae3790f470ed29cec91545420450f96fc77b84e589f1", @@ -38,7 +38,7 @@ "features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e", "features/continue-as-new.md": "e77725263167c3f64eac639ea43b83722a1c722804062562ab081bae5ef8c354", "features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b", - "features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898", + "features/external-payload-storage.md": "5b5e35b99ef4d37cf02dcd01a0099a612b19ec04b50a00275fd742c739f836a7", "features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365", "features/local-activities.md": "05fca8f2104d8f4e7bd8b48040f5615f18d0ee2795922fb65c56f8d3d70ed204", "features/memo.md": "e1bb34216febf112c0d9151b8a57e31cc2de17b4bf16980812da01c0e1c17f15", @@ -66,13 +66,13 @@ "mcp-workflows.md": "1c0b5bb7f2e5c7ca835dfdfa57bbe8f6624172c855f4e225057ac2377abf360e", "migration.md": "7304a53786d5e45d3a639c33386e6558e855ee77982883a5e051ef5084b8453b", "monitoring.md": "a64e6b94bb67ffc5c43d8030f18582f96c3d170e8b2bedaa83f280d45c98bbaf", - "operator-operating-envelope.md": "dc0cf13d8593e4ce2d8ec1912e45e61c9bf13f06abf7cc8c422379db5e3fa0ad", + "operator-operating-envelope.md": "516502ae2b2d0e574fb8b4fe3a2d5a187e5f07f3d041a1ab2053c5167503e213", "platform-conformance.md": "2eec7eba9a65c010e03c4b2eb78afe4dddd6fd8170218b3194c49e3777124c91", "platform-protocol-specs.md": "ba9c69adfca7fb4a0dd982464b0ca69dd5a21de1e340edbe23b075ec0fb0c35c", "polyglot/avro-value-protocol.md": "602e66c6288c1dd69d2b400c64e4739ad3a0493b5be269cee40f7848b11f260a", "polyglot/cancellation.md": "f676cd3ddb39246a0f580a1e16c83bc36d2ed9458b9e6009af4cc192d299ac62", "polyglot/cli-python-parity.md": "50f9da7fc410f1046328b35333feb3c123e7007316b5ce5b07f88404537ae36f", - "polyglot/cli-reference.md": "9028b697b8d41abdbf5d8d1d929aff656b905e2742b1c923dc21feea7df3fc7d", + "polyglot/cli-reference.md": "33f06968034324ed9813b1d7187fa2dccb689353616e59c6733e033ea285f0fe", "polyglot/cli.mdx": "dd4085314000b01ef1addf1686d287cfa2c1207797cb1126bc7cf44751daade1", "polyglot/cloud-control-plane.md": "9dc0b85e5ea41d59e55a8d12bef7b2dcafe69d9c499fb1305f58fde7a28d3e07", "polyglot/database-support.md": "518f679ae723ae4d39db7cac78008bc8edb84a6cfba2e6c668d8f2be5d378d03", @@ -93,7 +93,7 @@ "polyglot/server-api-reference.md": "dab6924c622276373f69185295cb78b19a3a1c531db304e5106d0f02fdfe987c", "polyglot/server-config-reference.md": "36ecbb5b76246f9c8e434b79745c3fef3265d0606aae486247064e23e7a6bb64", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", - "polyglot/server.md": "599367e6efc4819ec013114318e207cac9d54a02a74f434482f4c17595f201b3", + "polyglot/server.md": "4ae391d98cc7d2d698c9800a382ccc9a5767780bfcb12ebf7436a312a636262f", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", "polyglot/task-matching-dispatch.md": "9c8ffbbee16b5da48e7882721d7ba8eac209a374a6ca766d93d2b17e825b203d", "polyglot/task-queue-admission.md": "efcf934876a27c153dd3ecd1a995e7c08b37452c79dfcbba1ae7fa0a8cbad327", diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md index 11d106b3a7f..4b25bd2d17b 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md @@ -39,7 +39,7 @@ Os exemplos foram verificados com o PHP Server **2.9.5** publicado, seu Workflow 5. **Preserve os bytes externos.** As exportações preservam os envelopes de referências externas, não uma cópia independente de cada objeto. Preserve esses bytes durante toda a vida da exportação e teste sua recuperação sem um cache aquecido do runtime. Siga o [ciclo de vida dos payloads externos](../features/external-payload-storage.md#replay-retention-and-cleanup). 6. **Reconcilie antes de limpar.** Compare o inventário das execuções encerradas com os registros verificados no destino. Alerte sobre ids ausentes, verificações com falha e exportações pendentes próximas do limite. Avance o checkpoint apenas após contabilizar cada candidata. Examine novamente janelas de encerramento sobrepostas e deduplique por namespace e id da execução. Não substitua um pacote completo verificado por uma exportação posterior incompleta. -Essas etapas pertencem à aplicação; não são uma operação de arquivo autossuficiente suportada pelo produto. [Server #520](https://github.com/durable-workflow/server/issues/520) acompanha a funcionalidade ausente para copiar, reter e verificar a frio todos os bytes externos necessários. Uma exportação bem-sucedida apenas de referências ou uma verificação manual de checksum não conclui esse requisito. +Essas etapas pertencem à aplicação para exportações incorporadas. Uma exportação incorporada mantém referências a payloads externos, então uma exportação ou verificação de checksum bem-sucedida não preserva os bytes externos. No Server native 3.0.3 ou posterior, o `dw` 2.13.0 ou posterior, com uma credencial de administrador, grava, em vez disso, um [arquivo de histórico autossuficiente verificado](../polyglot/cli-reference.md#history-archives). Esse arquivo copia cada objeto externo referenciado sob o bloqueio de backup do Server e depois verifica os bytes a frio. :::warning A remoção de dados é irreversível sem uma cópia de recuperação diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/external-payload-storage.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/external-payload-storage.md index 7d2d575c865..b59ea7ce909 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/external-payload-storage.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/external-payload-storage.md @@ -71,7 +71,7 @@ Deixe margem em relação aos limites normais de solicitações e payloads. O li - **Integridade do replay.** Um valor só é decodificado após buscar e verificar seus bytes. Preserve os objetos ainda necessários a qualquer execução retida. - **Cache de buscas verificadas.** `ExternalPayloadStorage` limita seu cache de bytes verificados. Limpá-lo não exclui o objeto nem altera sua propriedade. - **Retenção.** A limpeza do runtime considera proprietários retidos e objetos compartilhados. Falhas de armazenamento, retenções para backup ou referências restantes podem atrasar a exclusão. Executar a retenção não garante ausência de objetos órfãos. -- **Exportação do histórico.** Uma exportação pode preservar metadados de referências sem buscar o objeto. Seu checksum ou `history_complete` não comprova a existência dos bytes externos nem que o arquivo pode ser reproduzido. Respeite o [limite de backup e restauração](../configuration/pruning-workflows.md#export-before-pruning) e verifique objetos separadamente. Arquivos autossuficientes continuam em [Server #520](https://github.com/durable-workflow/server/issues/520). +- **Exportação do histórico.** Uma exportação pode preservar metadados de referências sem buscar o objeto. Seu checksum ou `history_complete` não comprova a existência dos bytes externos nem que o arquivo pode ser reproduzido. Respeite o [limite de backup e restauração](../configuration/pruning-workflows.md#export-before-pruning) e verifique objetos separadamente. Exportações incorporadas continuam contendo apenas referências. No Server native, `dw workflow:history-archive` copia os bytes para um [arquivo autossuficiente verificado](../polyglot/cli-reference.md#history-archives). ## Uso por código {#using-it-from-code} diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/operator-operating-envelope.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/operator-operating-envelope.md index c726494cab4..707d755df87 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/operator-operating-envelope.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/operator-operating-envelope.md @@ -395,7 +395,7 @@ Use esta sequência de verificação: As rotas correspondentes de exportação e arquivamento do Waterline estão na [referência da sua API do operador](./waterline-operator-api.md). -Verificações de checksum e estrutura não provam que uma exportação contenha todos os eventos originais ou bytes externos independentes. Recuse fontes já limpas: o indicador incorreto de exportação completa continua sendo um defeito aberto em [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Este procedimento manual também não entrega a operação de arquivo autossuficiente verificado solicitada em [Server #520](https://github.com/durable-workflow/server/issues/520). Separe essas lacunas do produto das verificações de recuperação que sua implantação realmente passou. +Verificações de checksum e estrutura não provam que uma exportação contenha todos os eventos originais ou bytes externos independentes. Recuse fontes já limpas: o indicador incorreto de exportação completa continua sendo um defeito aberto em [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Este procedimento manual também não produz um arquivo autossuficiente. Para isso, no Server native, use `dw workflow:history-archive` ([comandos de arquivo de histórico](./polyglot/cli-reference.md#history-archives)). Separe essa lacuna do produto das verificações de recuperação que sua implantação realmente passou. ## Contrato de backup, restauração e recuperação de desastres {#backup-restore-and-disaster-recovery-contract} diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md index dc4fa79e79b..a57e41bbdd0 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md @@ -225,7 +225,9 @@ runtime, não no arquivo de perfil. | `dw workflow:list-runs ` | Lista execuções de uma instância. | `--json` | | `dw workflow:show-run ` | Mostra uma execução. | `--follow`, `--json` | | `dw workflow:history ` | Lê eventos do histórico da execução. | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | Exporta o payload de histórico de arquivo da execução. | `--output-file`, opções globais | +| `dw workflow:history-export ` | Exporta o pacote de histórico da execução. Payloads externos permanecem como referências. | `--output-file`, opções globais | +| `dw workflow:history-archive ` | Grava um arquivo autossuficiente verificado de uma execução encerrada, incluindo os bytes de cada payload externo (Server native). | `--hold-ttl`, `--json`, opções globais | +| `dw workflow:history-archive-check ` | Verifica um arquivo de histórico apenas a partir dos arquivos que o compõem. | `--json` | | `dw workflow:signal ` | Envia um sinal. | `--request-id`, `--run-id`, opções de entrada, `--json` | | `dw workflow:query ` | Executa consulta de workflow somente leitura. | `--run-id`, opções de entrada, `--json` | | `dw workflow:update ` | Envia ou executa uma atualização. | `--wait=accepted\|completed`, `--request-id`, `--run-id`, opções de entrada, `--json` | @@ -307,6 +309,64 @@ com 5, o que não prova que a atualização nunca foi aceita. Um Server sem a capacidade, incluindo PHP Server 2.x, sai com 8 antes de enviar uma requisição de resultado. +### Arquivos de histórico {#history-archives} + +`dw workflow:history-archive` (dw 2.13.0 ou posterior, Server native +3.0.3 ou posterior, credencial de administrador) grava uma execução +encerrada em um diretório. Ele usa as rotas do Server de exportação de +histórico, busca de payloads externos e bloqueio de backup. O diretório contém a exportação de histórico do +Server, os bytes exatos de cada payload externo referenciado pela exportação, +um `manifest.json` com o codec, o tamanho e o SHA-256 de cada objeto, e um +`receipt.json`. + +A cópia funciona assim: + +1. O dw adquire o bloqueio de backup de payloads externos do Server, para que + nenhum payload seja removido durante a cópia. +2. O dw busca cada objeto uma vez e confere seu tamanho e digest. +3. O dw verifica o diretório inteiro a partir do disco. +4. O dw confirma que o bloqueio nunca expirou. +5. Só então o dw grava o recibo. + +O bloqueio é liberado em todos os caminhos. Isso inclui Ctrl-C (código de saída +130) e, no Unix, SIGTERM (código de saída 143). Nenhum recibo é gravado após um +sinal. + +`--hold-ttl` define a duração do bloqueio em segundos: 900 por padrão, de 60 a +3600. Cada objeto precisa chegar dentro da metade dessa duração, então aumente o +valor para objetos grandes. + +O comando informa um de três resultados: + +| Resultado | Código de saída | Significado | +| --- | --- | --- | +| `verified` | 0 | O arquivo está completo. | +| `incomplete` | 1 | Nenhum recibo foi gravado. Execute o mesmo comando novamente para retomar. | +| `refused` | 2 | Nada foi copiado. A execução está aberta, limpa ou ocultada, seu histórico tem uma lacuna de sequência, ou ela contém uma referência que o transporte do runtime não consegue buscar. | + +Outros backups usam o mesmo bloqueio, então uma cópia é recusada com HTTP 409 +(código de saída 2) enquanto outro o mantém; tente novamente mais tarde. Um +token sem permissão de administrador recebe HTTP 403 (código de saída 4), e nada +é copiado. Um Server sem a rota do bloqueio de backup, ou um `--hold-ttl` +inválido, termina com o código 1. Os demais erros de conexão, autenticação e do +Server mantêm seus códigos de saída habituais. + +`dw workflow:history-archive-check ` não precisa de Server. Ele lê +cada arquivo de volta e informa `verified`, `incomplete` com uma constatação +codificada para cada verificação que falhou, ou `refused`. + +O Server native 3.30.0 adiciona apenas um verificador offline, +`durable-workflow-server history-archive verify `, de que o +`dw workflow:history-archive` não precisa. O verificador lê +apenas o diretório, imprime o relatório JSON e só termina com 0 quando o +resultado é `verified`. + +Um arquivo cobre apenas a execução selecionada. Ele não é um backup do banco de +dados. É gravado sem criptografia, e seu ciclo de vida é responsabilidade da +aplicação. O formato, o escopo e os códigos de constatação estão no +[guia de arquivos de histórico](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) +do Server. + ## Inspeção de chamadas de serviço {#service-call-inspection} Use `dw service-call:describe ` para diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server.md index 68b42b035fd..d3dc16d31a4 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server.md @@ -362,7 +362,7 @@ Para manter um registro além da janela limitada de 1 a 365 dias, escolha entre A limpeza remove histórico, detalhes relacionados e payloads externos elegíveis. Uma ampliação posterior da política não pode recuperá-los. O [guia de limpeza incorporada](../configuration/pruning-workflows.md) descreve um processo separado controlado pela aplicação; sua API de limpeza não aplica a política de retenção por namespace do Server. Para outro runtime, confirme o comportamento de retenção antes de aplicar este procedimento do PHP Server. -As exportações atuais preservam referências externas, não cópias independentes dos objetos. O fluxo de arquivo autossuficiente verificado é solicitado em [Server #520](https://github.com/durable-workflow/server/issues/520); uma exportação com checksum não o fornece. Recuse também históricos já limpos em vez de confiar no indicador `history_complete`: o caso conhecido de falsa completude permanece aberto em [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). +Uma exportação de histórico preserva referências externas, não cópias independentes dos objetos. No Server native 3.0.3 ou posterior, `dw workflow:history-archive` (dw 2.13.0 ou posterior, credencial de administrador) grava um arquivo autossuficiente verificado. Ele contém a exportação, os bytes exatos de cada objeto externo referenciado por ela, um manifesto com os digests desses objetos e um recibo. O arquivo continua legível depois que a retenção limpa a execução, e também sem o Server ou seu armazenamento de payloads. Consulte os [comandos de arquivo de histórico](./cli-reference.md#history-archives) e o [guia do formato de arquivo](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) do Server. O Server native 3.30.0 adiciona apenas o verificador offline `durable-workflow-server history-archive verify`. Recuse também históricos já limpos em vez de confiar no indicador `history_complete`: o caso conhecido de falsa completude permanece aberto em [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). ### Namespaces {#namespaces} diff --git a/i18n/pt-BR/source-hashes.json b/i18n/pt-BR/source-hashes.json index caa754f7a02..3e58ba988e9 100644 --- a/i18n/pt-BR/source-hashes.json +++ b/i18n/pt-BR/source-hashes.json @@ -10,7 +10,7 @@ "configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a", "configuration/microservices.md": "7421f8f18b62bc326601e2670ba15ba45fb02056da0d70e94ef89b3870f79cb0", "configuration/options.md": "d5079c5059aaa1072693ac09b3b8ea2be9176279820459370e5ebe6660d9f43b", - "configuration/pruning-workflows.md": "6f6ee2be3bd185ffec764e86c3ed3cbd40c45f75d28671b4cd11226493e11afb", + "configuration/pruning-workflows.md": "13b314e3da5446788691cfc5801be68591fb11c9b8a7605ef58946692d7062ae", "configuration/publishing-config.md": "3c84a87186db1eec8f59d25b81e6018ffabe3afb8ce2bb5011e66fccabb3221d", "constraints/activity-constraints.md": "5a953d0e95e750b6c02d1c72b72199fb3ff4687540cebc56aa3b216cf667bb05", "constraints/constraints-summary.md": "fb48d01502388fc3821eae3790f470ed29cec91545420450f96fc77b84e589f1", @@ -38,7 +38,7 @@ "features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e", "features/continue-as-new.md": "e77725263167c3f64eac639ea43b83722a1c722804062562ab081bae5ef8c354", "features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b", - "features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898", + "features/external-payload-storage.md": "5b5e35b99ef4d37cf02dcd01a0099a612b19ec04b50a00275fd742c739f836a7", "features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365", "features/local-activities.md": "05fca8f2104d8f4e7bd8b48040f5615f18d0ee2795922fb65c56f8d3d70ed204", "features/memo.md": "e1bb34216febf112c0d9151b8a57e31cc2de17b4bf16980812da01c0e1c17f15", @@ -66,13 +66,13 @@ "mcp-workflows.md": "1c0b5bb7f2e5c7ca835dfdfa57bbe8f6624172c855f4e225057ac2377abf360e", "migration.md": "7304a53786d5e45d3a639c33386e6558e855ee77982883a5e051ef5084b8453b", "monitoring.md": "a64e6b94bb67ffc5c43d8030f18582f96c3d170e8b2bedaa83f280d45c98bbaf", - "operator-operating-envelope.md": "dc0cf13d8593e4ce2d8ec1912e45e61c9bf13f06abf7cc8c422379db5e3fa0ad", + "operator-operating-envelope.md": "516502ae2b2d0e574fb8b4fe3a2d5a187e5f07f3d041a1ab2053c5167503e213", "platform-conformance.md": "2eec7eba9a65c010e03c4b2eb78afe4dddd6fd8170218b3194c49e3777124c91", "platform-protocol-specs.md": "ba9c69adfca7fb4a0dd982464b0ca69dd5a21de1e340edbe23b075ec0fb0c35c", "polyglot/avro-value-protocol.md": "602e66c6288c1dd69d2b400c64e4739ad3a0493b5be269cee40f7848b11f260a", "polyglot/cancellation.md": "f676cd3ddb39246a0f580a1e16c83bc36d2ed9458b9e6009af4cc192d299ac62", "polyglot/cli-python-parity.md": "50f9da7fc410f1046328b35333feb3c123e7007316b5ce5b07f88404537ae36f", - "polyglot/cli-reference.md": "9028b697b8d41abdbf5d8d1d929aff656b905e2742b1c923dc21feea7df3fc7d", + "polyglot/cli-reference.md": "33f06968034324ed9813b1d7187fa2dccb689353616e59c6733e033ea285f0fe", "polyglot/cli.mdx": "dd4085314000b01ef1addf1686d287cfa2c1207797cb1126bc7cf44751daade1", "polyglot/cloud-control-plane.md": "9dc0b85e5ea41d59e55a8d12bef7b2dcafe69d9c499fb1305f58fde7a28d3e07", "polyglot/database-support.md": "518f679ae723ae4d39db7cac78008bc8edb84a6cfba2e6c668d8f2be5d378d03", @@ -93,7 +93,7 @@ "polyglot/server-api-reference.md": "dab6924c622276373f69185295cb78b19a3a1c531db304e5106d0f02fdfe987c", "polyglot/server-config-reference.md": "36ecbb5b76246f9c8e434b79745c3fef3265d0606aae486247064e23e7a6bb64", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", - "polyglot/server.md": "599367e6efc4819ec013114318e207cac9d54a02a74f434482f4c17595f201b3", + "polyglot/server.md": "4ae391d98cc7d2d698c9800a382ccc9a5767780bfcb12ebf7436a312a636262f", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", "polyglot/task-matching-dispatch.md": "9c8ffbbee16b5da48e7882721d7ba8eac209a374a6ca766d93d2b17e825b203d", "polyglot/task-queue-admission.md": "efcf934876a27c153dd3ecd1a995e7c08b37452c79dfcbba1ae7fa0a8cbad327", diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md b/i18n/uk/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md index 191bef2b251..e55d972bdb1 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md @@ -75,7 +75,7 @@ Server має окрему політику зберігання namespace: ав закриття з перекриттям, усуваючи дублікати за namespace і run id. Не перезаписуйте перевірений повний bundle пізнішим неповним експортом. -Цими кроками керує застосунок; це не підтримувана операція створення самодостатнього архіву. [Server #520](https://github.com/durable-workflow/server/issues/520) відстежує відсутню продуктову процедуру копіювання, утримання та холодної перевірки всіх потрібних зовнішніх байтів. Успішний експорт лише посилань або ручна перевірка контрольної суми не виконують цієї вимоги. +Цими кроками для embedded-експортів керує застосунок. Embedded-експорт зберігає посилання на зовнішні payload, тому успішний експорт або перевірка контрольної суми не зберігають зовнішні байти. На native Server 3.0.3 або новішому `dw` 2.13.0 або новіший з обліковими даними адміністратора натомість записує [самодостатній перевірений архів історії](../polyglot/cli-reference.md#history-archives). Цей архів копіює кожен зовнішній об’єкт, на який є посилання, під утриманням резервного копіювання Server, а потім виконує холодну перевірку байтів. :::warning Очищення незворотне без копії для відновлення diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/features/external-payload-storage.md b/i18n/uk/docusaurus-plugin-content-docs/current/features/external-payload-storage.md index 5b244a0ad0a..5373c7d94d5 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/features/external-payload-storage.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/features/external-payload-storage.md @@ -71,7 +71,7 @@ Server може використовувати локальне сховище, - **Цілісність replay.** Значення декодується лише після отримання й перевірки байтів за посиланням. Зберігайте об’єкти для кожного утримуваного run, якому вони ще потрібні. - **Кеш перевірених отримань.** `ExternalPayloadStorage` обмежує кеш перевірених байтів. Очищення кешу не видаляє об’єкт і не змінює його власника. - **Політика зберігання.** Очищення runtime враховує утримуваних власників і спільні об’єкти. Збої сховища, блокування для резервних копій чи решта посилань можуть затримати видалення. Запущена retention-процедура не гарантує відсутності осиротілих об’єктів. -- **Експорт історії.** Експорт може зберегти метадані посилання, не отримуючи сам об’єкт. Контрольна сума чи прапорець `history_complete` не доводять наявності зовнішніх байтів або можливості replay архіву. Дотримуйтеся [межі резервного копіювання й відновлення](../configuration/pruning-workflows.md#export-before-pruning) та перевіряйте об’єкти окремо. Самодостатні архіви відстежуються в [Server #520](https://github.com/durable-workflow/server/issues/520). +- **Експорт історії.** Експорт може зберегти метадані посилання, не отримуючи сам об’єкт. Контрольна сума чи прапорець `history_complete` не доводять наявності зовнішніх байтів або можливості replay архіву. Дотримуйтеся [межі резервного копіювання й відновлення](../configuration/pruning-workflows.md#export-before-pruning) та перевіряйте об’єкти окремо. Embedded-експорти й надалі містять лише посилання. На native Server `dw workflow:history-archive` копіює байти в [самодостатній перевірений архів](../polyglot/cli-reference.md#history-archives). ## Використання з коду {#using-it-from-code} diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/operator-operating-envelope.md b/i18n/uk/docusaurus-plugin-content-docs/current/operator-operating-envelope.md index ee0fe004b30..150f8df078f 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/operator-operating-envelope.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/operator-operating-envelope.md @@ -579,7 +579,7 @@ repair чи watchdog вашої топології. Відповідні маршрути експорту історії й архівування Waterline наведені в [довіднику операторського API Waterline](./waterline-operator-api.md). -Перевірка контрольної суми та структури не доводить, що експорт містить усі початкові події або незалежні зовнішні байти. Відхиляйте вже очищені джерела: хибна ознака повного експорту залишається відкритим дефектом у [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Ручна процедура також не реалізує самодостатню операцію перевіреного архівування, запитану у [Server #520](https://github.com/durable-workflow/server/issues/520). Відокремлюйте ці прогалини продукту від перевірок відновлення, які ваше розгортання фактично пройшло. +Перевірка контрольної суми та структури не доводить, що експорт містить усі початкові події або незалежні зовнішні байти. Відхиляйте вже очищені джерела: хибна ознака повного експорту залишається відкритим дефектом у [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). Ця ручна процедура також не створює самодостатнього архіву. Для цього на native Server використовуйте `dw workflow:history-archive` ([команди архівів історії](./polyglot/cli-reference.md#history-archives)). Відокремлюйте цю прогалину продукту від перевірок відновлення, які ваше розгортання фактично пройшло. ## Контракт резервних копій і аварійного відновлення {#backup-restore-and-disaster-recovery-contract} diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md index 9413f06eaaa..d8dfe9629c4 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md @@ -224,7 +224,9 @@ JSON містить стабільне поле `status` для автомати | `dw workflow:list-runs ` | Показати виконання екземпляра workflow. | `--json` | | `dw workflow:show-run ` | Показати одне виконання. | `--follow`, `--json` | | `dw workflow:history ` | Прочитати події історії виконання. | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | Експортувати архівний payload історії виконання. | `--output-file`, глобальні параметри | +| `dw workflow:history-export ` | Експортувати bundle історії виконання. Зовнішні payload залишаються посиланнями. | `--output-file`, глобальні параметри | +| `dw workflow:history-archive ` | Записати самодостатній перевірений архів закритого виконання, включно з байтами кожного зовнішнього payload (native Server). | `--hold-ttl`, `--json`, глобальні параметри | +| `dw workflow:history-archive-check ` | Перевірити архів історії лише за його файлами. | `--json` | | `dw workflow:signal ` | Надіслати signal. | `--request-id`, `--run-id`, параметри вводу, `--json` | | `dw workflow:query ` | Виконати query workflow лише для читання. | `--run-id`, параметри вводу, `--json` | | `dw workflow:update ` | Подати чи виконати update workflow. | `--wait=accepted\|completed`, `--request-id`, `--run-id`, параметри вводу, `--json` | @@ -305,6 +307,63 @@ update дає код 5, що не доводить, ніби update ніколи цієї можливості, зокрема PHP Server 2.x, дає код 8 до надсилання запиту результату. +### Архіви історії {#history-archives} + +`dw workflow:history-archive` (dw 2.13.0 або новіший, native Server +3.0.3 або новіший, облікові дані адміністратора) записує одне закрите +виконання в каталог. Команда використовує маршрути Server для експорту історії, +отримання зовнішніх payload і утримання резервного копіювання. Каталог містить експорт історії від Server, точні байти +кожного зовнішнього payload, на який посилається експорт, файл `manifest.json` +з кодеком, довжиною та SHA-256 кожного об’єкта, а також `receipt.json`. + +Копіювання відбувається так: + +1. dw отримує утримання резервного копіювання зовнішніх payload на Server, щоб + жоден payload не було звільнено під час копіювання. +2. dw отримує кожен об’єкт один раз і перевіряє його довжину та дайджест. +3. dw перевіряє весь каталог із диска. +4. dw підтверджує, що утримання жодного разу не спливло. +5. Лише після цього dw записує квитанцію. + +Утримання знімається за будь-якого сценарію. Це стосується й Ctrl-C (код +виходу 130) та, в Unix, SIGTERM (код виходу 143). Після сигналу квитанція не +записується. + +`--hold-ttl` задає тривалість утримання в секундах: типово 900, від 60 до 3600. +Кожен об’єкт має надійти протягом половини цього часу, тому для великих +об’єктів збільште значення. + +Команда повідомляє один із трьох результатів: + +| Результат | Код виходу | Значення | +| --- | --- | --- | +| `verified` | 0 | Архів повний. | +| `incomplete` | 1 | Квитанцію не записано. Запустіть ту саму команду ще раз, щоб продовжити. | +| `refused` | 2 | Нічого не скопійовано. Виконання відкрите, очищене або має приховані дані, його історія має пропуск у послідовності, або воно містить посилання, яке транспорт runtime не може отримати. | + +Інші резервні копії використовують те саме утримання, тому копіювання +відхиляється з HTTP 409 (код виходу 2), поки утримання зайняте іншою копією; +спробуйте пізніше. Токен без прав адміністратора отримує HTTP 403 (код виходу +4), і нічого не копіюється. Server без маршруту утримання резервного +копіювання або недійсне значення `--hold-ttl` дає код виходу 1. Інші помилки +з’єднання, автентифікації та Server зберігають свої звичайні коди виходу. + +`dw workflow:history-archive-check ` не потребує Server. Команда +повторно читає кожен файл і повідомляє `verified`, `incomplete` з кодованим +висновком для кожної невдалої перевірки або `refused`. + +Native Server 3.30.0 додає лише офлайн-перевірку командою +`durable-workflow-server history-archive verify `, яка не потрібна +`dw workflow:history-archive`. Ця команда читає лише +каталог, виводить звіт JSON і завершується з кодом 0 лише тоді, коли результат — +`verified`. + +Архів охоплює лише вибране виконання. Це не резервна копія бази даних. Його +записано без шифрування, а строком його зберігання керує застосунок. Формат, +обсяг і коди висновків описано в +[посібнику з архівів історії](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) +Server. + ## Перегляд викликів сервісів {#service-call-inspection} Використовуйте `dw service-call:describe ` diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server.md b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server.md index 535fc9ffc82..50a2923a566 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server.md @@ -464,7 +464,7 @@ Pruning видаляє історію, пов'язані деталі й при зберігання namespace Server. Для іншого runtime спочатку перевірте його retention-поведінку, перш ніж застосовувати цю процедуру PHP Server. -Поточний експорт історії зберігає зовнішні посилання, а не незалежні копії їхніх об’єктів. Самодостатню процедуру перевіреного архівування запитано у [Server #520](https://github.com/durable-workflow/server/issues/520); експорт із контрольною сумою її не забезпечує. Також відхиляйте вже очищену історію, а не довіряйте ознаці `history_complete`: відомий випадок хибної повноти залишається відкритим у [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). +Експорт історії зберігає зовнішні посилання, а не незалежні копії їхніх об’єктів. На native Server 3.0.3 або новішому `dw workflow:history-archive` (dw 2.13.0 або новіший, облікові дані адміністратора) записує самодостатній перевірений архів. Він містить експорт, точні байти кожного зовнішнього об’єкта, на який посилається експорт, маніфест їхніх дайджестів і квитанцію. Архів залишається придатним для читання після того, як політика зберігання очистить виконання, а також без Server чи його сховища payload. Див. [команди архівів історії](./cli-reference.md#history-archives) і [посібник із формату архіву](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md) Server. Native Server 3.30.0 додає лише офлайн-перевірку `durable-workflow-server history-archive verify`. Також відхиляйте вже очищену історію, а не довіряйте ознаці `history_complete`: відомий випадок хибної повноти залишається відкритим у [Workflow #856](https://github.com/durable-workflow/workflow/issues/856). ### Namespace {#namespaces} diff --git a/i18n/uk/source-hashes.json b/i18n/uk/source-hashes.json index caa754f7a02..3e58ba988e9 100644 --- a/i18n/uk/source-hashes.json +++ b/i18n/uk/source-hashes.json @@ -10,7 +10,7 @@ "configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a", "configuration/microservices.md": "7421f8f18b62bc326601e2670ba15ba45fb02056da0d70e94ef89b3870f79cb0", "configuration/options.md": "d5079c5059aaa1072693ac09b3b8ea2be9176279820459370e5ebe6660d9f43b", - "configuration/pruning-workflows.md": "6f6ee2be3bd185ffec764e86c3ed3cbd40c45f75d28671b4cd11226493e11afb", + "configuration/pruning-workflows.md": "13b314e3da5446788691cfc5801be68591fb11c9b8a7605ef58946692d7062ae", "configuration/publishing-config.md": "3c84a87186db1eec8f59d25b81e6018ffabe3afb8ce2bb5011e66fccabb3221d", "constraints/activity-constraints.md": "5a953d0e95e750b6c02d1c72b72199fb3ff4687540cebc56aa3b216cf667bb05", "constraints/constraints-summary.md": "fb48d01502388fc3821eae3790f470ed29cec91545420450f96fc77b84e589f1", @@ -38,7 +38,7 @@ "features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e", "features/continue-as-new.md": "e77725263167c3f64eac639ea43b83722a1c722804062562ab081bae5ef8c354", "features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b", - "features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898", + "features/external-payload-storage.md": "5b5e35b99ef4d37cf02dcd01a0099a612b19ec04b50a00275fd742c739f836a7", "features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365", "features/local-activities.md": "05fca8f2104d8f4e7bd8b48040f5615f18d0ee2795922fb65c56f8d3d70ed204", "features/memo.md": "e1bb34216febf112c0d9151b8a57e31cc2de17b4bf16980812da01c0e1c17f15", @@ -66,13 +66,13 @@ "mcp-workflows.md": "1c0b5bb7f2e5c7ca835dfdfa57bbe8f6624172c855f4e225057ac2377abf360e", "migration.md": "7304a53786d5e45d3a639c33386e6558e855ee77982883a5e051ef5084b8453b", "monitoring.md": "a64e6b94bb67ffc5c43d8030f18582f96c3d170e8b2bedaa83f280d45c98bbaf", - "operator-operating-envelope.md": "dc0cf13d8593e4ce2d8ec1912e45e61c9bf13f06abf7cc8c422379db5e3fa0ad", + "operator-operating-envelope.md": "516502ae2b2d0e574fb8b4fe3a2d5a187e5f07f3d041a1ab2053c5167503e213", "platform-conformance.md": "2eec7eba9a65c010e03c4b2eb78afe4dddd6fd8170218b3194c49e3777124c91", "platform-protocol-specs.md": "ba9c69adfca7fb4a0dd982464b0ca69dd5a21de1e340edbe23b075ec0fb0c35c", "polyglot/avro-value-protocol.md": "602e66c6288c1dd69d2b400c64e4739ad3a0493b5be269cee40f7848b11f260a", "polyglot/cancellation.md": "f676cd3ddb39246a0f580a1e16c83bc36d2ed9458b9e6009af4cc192d299ac62", "polyglot/cli-python-parity.md": "50f9da7fc410f1046328b35333feb3c123e7007316b5ce5b07f88404537ae36f", - "polyglot/cli-reference.md": "9028b697b8d41abdbf5d8d1d929aff656b905e2742b1c923dc21feea7df3fc7d", + "polyglot/cli-reference.md": "33f06968034324ed9813b1d7187fa2dccb689353616e59c6733e033ea285f0fe", "polyglot/cli.mdx": "dd4085314000b01ef1addf1686d287cfa2c1207797cb1126bc7cf44751daade1", "polyglot/cloud-control-plane.md": "9dc0b85e5ea41d59e55a8d12bef7b2dcafe69d9c499fb1305f58fde7a28d3e07", "polyglot/database-support.md": "518f679ae723ae4d39db7cac78008bc8edb84a6cfba2e6c668d8f2be5d378d03", @@ -93,7 +93,7 @@ "polyglot/server-api-reference.md": "dab6924c622276373f69185295cb78b19a3a1c531db304e5106d0f02fdfe987c", "polyglot/server-config-reference.md": "36ecbb5b76246f9c8e434b79745c3fef3265d0606aae486247064e23e7a6bb64", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", - "polyglot/server.md": "599367e6efc4819ec013114318e207cac9d54a02a74f434482f4c17595f201b3", + "polyglot/server.md": "4ae391d98cc7d2d698c9800a382ccc9a5767780bfcb12ebf7436a312a636262f", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", "polyglot/task-matching-dispatch.md": "9c8ffbbee16b5da48e7882721d7ba8eac209a374a6ca766d93d2b17e825b203d", "polyglot/task-queue-admission.md": "efcf934876a27c153dd3ecd1a995e7c08b37452c79dfcbba1ae7fa0a8cbad327", diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md index c7d8e334d54..6ee6e75adc3 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/configuration/pruning-workflows.md @@ -37,7 +37,7 @@ Server 另有命名空间保留策略,自动清理会跳过归档运行。因 5. **保留外部字节。** 导出保留外部引用信封,并非每个引用对象的独立副本。为导出的完整生命周期保存这些字节,并在不使用已预热运行时缓存的情况下验证读取。遵循[外部载荷生命周期](../features/external-payload-storage.md#replay-retention-and-cleanup)。 6. **清理前对账。** 将已关闭运行清单与目标存储中已验证记录逐一比较。对缺失运行 ID、验证失败和接近保留截止时间的积压发出告警。只有全部候选项均已确认,才能推进导出检查点。使用重叠的关闭时间窗口重复扫描,并按命名空间与运行 ID 去重。不要用后续不完整导出覆盖已验证的完整包。 -这些步骤由应用负责,并不是产品支持的自包含归档操作。[Server #520](https://github.com/durable-workflow/server/issues/520) 跟踪尚缺的产品流程:复制、保留并冷验证所有必需的外部字节。成功导出仅含引用的文件,或手动检查校验和,都不算满足该需求。 +这些是针对嵌入式导出、由应用负责的步骤。嵌入式导出保留对外部载荷的引用,因此导出成功或校验和检查通过都不能保全外部字节。在 native Server 3.0.3 或更高版本上,使用管理员凭据的 `dw` 2.13.0 或更高版本会改为写出[自包含且经过验证的历史归档](../polyglot/cli-reference.md#history-archives)。该归档在 Server 的备份保留锁保护下复制每个被引用的外部对象,然后对这些字节进行冷验证。 :::warning 没有恢复副本时,清理不可逆 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/external-payload-storage.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/external-payload-storage.md index e2c49616a51..e184d4cc940 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/external-payload-storage.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/external-payload-storage.md @@ -71,7 +71,7 @@ Server 自身可以使用本地存储,而远程 SDK Worker 通过 HTTP 获取 - **重放完整性。** 只有在获取并验证引用字节后才解码值。任何保留运行仍需使用的对象都必须保留。 - **已验证读取缓存。** `ExternalPayloadStorage` 对已验证字节缓存设有边界。清空缓存不会删除底层对象或改变其所有权。 - **保留。** 运行时清理会考虑仍被保留的所有者和共享对象。存储故障、备份保留或剩余引用可能延迟删除。运行保留清理并不保证没有孤立对象。 -- **历史导出。** 导出可以不获取对象而保留引用元数据。校验和或 `history_complete` 标记并不能证明外部字节存在,也不能证明归档可重放。请遵守[备份与恢复边界](../configuration/pruning-workflows.md#export-before-pruning),并单独验证对象。自包含归档仍由 [Server #520](https://github.com/durable-workflow/server/issues/520) 跟踪。 +- **历史导出。** 导出可以不获取对象而保留引用元数据。校验和或 `history_complete` 标记并不能证明外部字节存在,也不能证明归档可重放。请遵守[备份与恢复边界](../configuration/pruning-workflows.md#export-before-pruning),并单独验证对象。嵌入式导出仍只包含引用。在 native Server 上,`dw workflow:history-archive` 会将这些字节复制到[自包含且经过验证的归档](../polyglot/cli-reference.md#history-archives)中。 ## 在代码中使用 {#using-it-from-code} diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/operator-operating-envelope.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/operator-operating-envelope.md index d9bf8fc84a8..99da5ada11c 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/operator-operating-envelope.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/operator-operating-envelope.md @@ -395,7 +395,7 @@ Workflow 2.6.3 及更新版本中,标记 `details_pruned_at` 的保留运行 Waterline 对应导出与归档路由见 [Waterline 运维 API 参考](./waterline-operator-api.md)。 -校验和与结构检查不能证明导出包含全部原始事件或独立的外部字节。请拒绝已清理的来源;错误的“完整导出”标记仍是 [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) 中的未解决缺陷。此手动流程也没有交付 [Server #520](https://github.com/durable-workflow/server/issues/520) 要求的自包含且经过验证的归档操作。请将这些产品缺口与部署实际通过的恢复检查分开看待。 +校验和与结构检查不能证明导出包含全部原始事件或独立的外部字节。请拒绝已清理的来源;错误的“完整导出”标记仍是 [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) 中的未解决缺陷。此手动流程也不会生成自包含归档。在 native Server 上,请为此使用 `dw workflow:history-archive`([历史归档命令](./polyglot/cli-reference.md#history-archives))。请将这一产品缺口与部署实际通过的恢复检查分开看待。 ## 备份、恢复与灾难恢复契约 {#backup-restore-and-disaster-recovery-contract} diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md index 8445d8b3ca8..b3a774959d7 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/cli-reference.md @@ -148,7 +148,9 @@ dw server:info --output=json \ | `dw workflow:list-runs ` | 列出工作流实例的运行。 | `--json` | | `dw workflow:show-run ` | 展示单次运行。 | `--follow`, `--json` | | `dw workflow:history ` | 读取运行历史事件。 | `--follow`, `--page-size`, `--json` | -| `dw workflow:history-export ` | 导出归档用的运行历史负载。 | `--output-file`, 全局选项 | +| `dw workflow:history-export ` | 导出运行历史包。外部负载仍为引用。 | `--output-file`, 全局选项 | +| `dw workflow:history-archive ` | 为已关闭的运行写出自包含且经过验证的归档,包括每个外部负载的字节(native Server)。 | `--hold-ttl`, `--json`, 全局选项 | +| `dw workflow:history-archive-check ` | 仅凭归档自身的文件验证历史归档。 | `--json` | | `dw workflow:signal ` | 发送信号。 | `--request-id`, `--run-id`, 输入选项, `--json` | | `dw workflow:query ` | 执行只读工作流查询。 | `--run-id`, 输入选项, `--json` | | `dw workflow:update ` | 提交或执行工作流更新。 | `--wait=accepted\|completed`, `--request-id`, `--run-id`, 输入选项, `--json` | @@ -204,6 +206,38 @@ dw workflow:update-outcome order-123 "$UPDATE_ID" --wait=completed --wait-timeou `--wait-timeout` 要求使用 `--wait=completed`,且值为至少一秒的整数。更新失败时退出码为 2。未知或已清理的更新 ID 对应退出码 5,但这不能证明该更新从未被接受。如果 Server 不支持此能力(包括 PHP Server 2.x),命令会在发送结果请求前以 8 退出。 +### 历史归档 {#history-archives} + +`dw workflow:history-archive`(dw 2.13.0 或更高版本、native Server 3.0.3 或更高版本、管理员凭据)将一个已关闭的运行写入目录。它使用 Server 的历史导出、外部负载获取和备份保留锁路由。该目录包含 Server 的历史导出、导出所引用的每个外部负载的确切字节、记录每个对象编解码器、长度和 SHA-256 的 `manifest.json`,以及 `receipt.json`。 + +复制过程如下: + +1. dw 获取 Server 的外部负载备份保留锁,确保复制期间不会回收任何负载。 +2. dw 对每个对象只获取一次,并检查其长度和摘要。 +3. dw 从磁盘验证整个目录。 +4. dw 确认保留锁从未失效。 +5. 只有在此之后,dw 才写入回执。 + +无论走哪条路径,保留锁都会被释放,包括 Ctrl-C(退出码 130),以及 Unix 上的 SIGTERM(退出码 143)。收到信号后不会写入回执。 + +`--hold-ttl` 以秒为单位设置保留锁的租期:默认 900,范围为 60 到 3600。每个对象必须在租期的一半内到达,因此对于大型对象请调高该值。 + +该命令报告以下三种结果之一: + +| 结果 | 退出码 | 含义 | +| --- | --- | --- | +| `verified` | 0 | 归档完整。 | +| `incomplete` | 1 | 未写入回执。再次运行同一命令即可继续。 | +| `refused` | 2 | 未复制任何内容。该运行仍处于打开状态、已清理或已脱敏,其历史存在序号缺口,或者它包含运行时传输无法获取的引用。 | + +其他备份也使用同一个保留锁,因此在其他备份持有该锁时,复制会以 HTTP 409(退出码 2)被拒绝;请稍后重试。非管理员令牌会收到 HTTP 403(退出码 4),且不会复制任何内容。Server 不提供备份保留锁路由或 `--hold-ttl` 无效时,退出码为 1。其他连接、认证和 Server 错误保持其通常的退出码。 + +`dw workflow:history-archive-check ` 不需要 Server。它会读回每个文件,并报告 `verified`、针对每项失败检查附带编码发现的 `incomplete`,或 `refused`。 + +native Server 3.30.0 仅新增离线验证命令 `durable-workflow-server history-archive verify `,`dw workflow:history-archive` 并不需要它。该验证命令只读取目录,输出 JSON 报告,并且仅在结果为 `verified` 时以 0 退出。 + +归档仅涵盖所选运行,不是数据库备份。归档以未加密形式写入,其生命周期由应用负责。格式、范围和发现代码见 Server 的[历史归档指南](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md)。 + ## 服务调用检查 {#service-call-inspection} 用 `dw service-call:describe ` 检查端点命名空间中的一个持久 Nexus 调用。例如,`dw service-call:describe billing invoices create call-42 --namespace=shared --json` 返回完整 Server 响应。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server.md index eec2d430ed0..0f3a8333c20 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server.md @@ -351,7 +351,7 @@ curl -sS "$DURABLE_WORKFLOW_SERVER_URL/api/system/retention?limit=100" \ 清理移除历史、相关明细及符合条件的外部载荷,之后延长策略无法恢复。[嵌入式清理指南](../configuration/pruning-workflows.md)描述应用负责的独立流程,其清理 API 不应用 Server 命名空间保留策略。其他运行时应先验证保留行为,再应用此 PHP Server 流程。 -当前历史导出保留外部引用,而不是对象的独立副本。[Server #520](https://github.com/durable-workflow/server/issues/520) 请求提供自包含且经过验证的归档流程;导出加校验和并不提供该能力。还应拒绝已清理的历史,不要信任其 `history_complete` 标记;已知的错误完整性问题仍在 [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) 中保持未解决状态。 +历史导出保留外部引用,而不是对象的独立副本。在 native Server 3.0.3 或更高版本上,`dw workflow:history-archive`(dw 2.13.0 或更高版本、管理员凭据)可写出自包含且经过验证的归档。归档包含导出、导出所引用的每个外部对象的确切字节、记录这些对象摘要的清单以及回执。保留策略清理该运行之后,或在没有 Server 及其载荷存储的情况下,归档仍可读取。参见[历史归档命令](./cli-reference.md#history-archives)和 Server 的[归档格式指南](https://github.com/durable-workflow/server/blob/main/docs/history-archives.md)。native Server 3.30.0 仅新增离线验证命令 `durable-workflow-server history-archive verify`。还应拒绝已清理的历史,不要信任其 `history_complete` 标记;已知的错误完整性问题仍在 [Workflow #856](https://github.com/durable-workflow/workflow/issues/856) 中保持未解决状态。 ### 命名空间 {#namespaces} diff --git a/i18n/zh-Hans/source-hashes.json b/i18n/zh-Hans/source-hashes.json index caa754f7a02..3e58ba988e9 100644 --- a/i18n/zh-Hans/source-hashes.json +++ b/i18n/zh-Hans/source-hashes.json @@ -10,7 +10,7 @@ "configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a", "configuration/microservices.md": "7421f8f18b62bc326601e2670ba15ba45fb02056da0d70e94ef89b3870f79cb0", "configuration/options.md": "d5079c5059aaa1072693ac09b3b8ea2be9176279820459370e5ebe6660d9f43b", - "configuration/pruning-workflows.md": "6f6ee2be3bd185ffec764e86c3ed3cbd40c45f75d28671b4cd11226493e11afb", + "configuration/pruning-workflows.md": "13b314e3da5446788691cfc5801be68591fb11c9b8a7605ef58946692d7062ae", "configuration/publishing-config.md": "3c84a87186db1eec8f59d25b81e6018ffabe3afb8ce2bb5011e66fccabb3221d", "constraints/activity-constraints.md": "5a953d0e95e750b6c02d1c72b72199fb3ff4687540cebc56aa3b216cf667bb05", "constraints/constraints-summary.md": "fb48d01502388fc3821eae3790f470ed29cec91545420450f96fc77b84e589f1", @@ -38,7 +38,7 @@ "features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e", "features/continue-as-new.md": "e77725263167c3f64eac639ea43b83722a1c722804062562ab081bae5ef8c354", "features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b", - "features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898", + "features/external-payload-storage.md": "5b5e35b99ef4d37cf02dcd01a0099a612b19ec04b50a00275fd742c739f836a7", "features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365", "features/local-activities.md": "05fca8f2104d8f4e7bd8b48040f5615f18d0ee2795922fb65c56f8d3d70ed204", "features/memo.md": "e1bb34216febf112c0d9151b8a57e31cc2de17b4bf16980812da01c0e1c17f15", @@ -66,13 +66,13 @@ "mcp-workflows.md": "1c0b5bb7f2e5c7ca835dfdfa57bbe8f6624172c855f4e225057ac2377abf360e", "migration.md": "7304a53786d5e45d3a639c33386e6558e855ee77982883a5e051ef5084b8453b", "monitoring.md": "a64e6b94bb67ffc5c43d8030f18582f96c3d170e8b2bedaa83f280d45c98bbaf", - "operator-operating-envelope.md": "dc0cf13d8593e4ce2d8ec1912e45e61c9bf13f06abf7cc8c422379db5e3fa0ad", + "operator-operating-envelope.md": "516502ae2b2d0e574fb8b4fe3a2d5a187e5f07f3d041a1ab2053c5167503e213", "platform-conformance.md": "2eec7eba9a65c010e03c4b2eb78afe4dddd6fd8170218b3194c49e3777124c91", "platform-protocol-specs.md": "ba9c69adfca7fb4a0dd982464b0ca69dd5a21de1e340edbe23b075ec0fb0c35c", "polyglot/avro-value-protocol.md": "602e66c6288c1dd69d2b400c64e4739ad3a0493b5be269cee40f7848b11f260a", "polyglot/cancellation.md": "f676cd3ddb39246a0f580a1e16c83bc36d2ed9458b9e6009af4cc192d299ac62", "polyglot/cli-python-parity.md": "50f9da7fc410f1046328b35333feb3c123e7007316b5ce5b07f88404537ae36f", - "polyglot/cli-reference.md": "9028b697b8d41abdbf5d8d1d929aff656b905e2742b1c923dc21feea7df3fc7d", + "polyglot/cli-reference.md": "33f06968034324ed9813b1d7187fa2dccb689353616e59c6733e033ea285f0fe", "polyglot/cli.mdx": "dd4085314000b01ef1addf1686d287cfa2c1207797cb1126bc7cf44751daade1", "polyglot/cloud-control-plane.md": "9dc0b85e5ea41d59e55a8d12bef7b2dcafe69d9c499fb1305f58fde7a28d3e07", "polyglot/database-support.md": "518f679ae723ae4d39db7cac78008bc8edb84a6cfba2e6c668d8f2be5d378d03", @@ -93,7 +93,7 @@ "polyglot/server-api-reference.md": "dab6924c622276373f69185295cb78b19a3a1c531db304e5106d0f02fdfe987c", "polyglot/server-config-reference.md": "36ecbb5b76246f9c8e434b79745c3fef3265d0606aae486247064e23e7a6bb64", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", - "polyglot/server.md": "599367e6efc4819ec013114318e207cac9d54a02a74f434482f4c17595f201b3", + "polyglot/server.md": "4ae391d98cc7d2d698c9800a382ccc9a5767780bfcb12ebf7436a312a636262f", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", "polyglot/task-matching-dispatch.md": "9c8ffbbee16b5da48e7882721d7ba8eac209a374a6ca766d93d2b17e825b203d", "polyglot/task-queue-admission.md": "efcf934876a27c153dd3ecd1a995e7c08b37452c79dfcbba1ae7fa0a8cbad327",