-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(swing-store): add 'replay' artifactMode, make export more strict
Previously, `makeSwingStoreExporter()` took a positional argument named `exportMode`, with values of 'current', 'archival', or 'debug'. This controlled how many artifacts were included in the export, on a best-effort basis (e.g. a DB whose old spans were pruned would emit the same artifacts with either 'current' or 'archival'). `importSwingStore()` took an options bag with both the `makeSwingStore` options (like `keepSnapshots` and `keepTranscripts`), and an import-specific `includeHistorical` boolean, which controlled which artifacts were processed by the import. This was also on a best-effort basis: `includeHistorical: true` on an export dataset that lacked old spans would produce the same (pruned) DB as `false`. This commit changes both APIs to take an options bag with a common `artifactMode` option, with values of `operational`, `replay`, `archival`, or `debug`. The `operational` choice replaces `current` and behaves the same way: just enough data for normal operations. The new `replay` choice 'operational' and 'archival', and selects all transcript spans for the current incarnation of each vat, but omits transcript spans for old incarnations: enough to perform a full vat-replay of the latest incarnation. Note: `makeSwingStoreExporter` was changed from a positional argument to an options bag, and no attempt was made to be compatible with old-style callers. During export, the mode is now strict: if the DB lacks the artifacts requested by the given mode, `makeSwingStoreExporter()` will throw an error, rather than emit fewer artifacts than desired. This means `artifactMode: 'replay'` will fail unless the DB being exported has all those old (current-incarnation) transcript items. And `archival` will fail unless the DB has the old incarnation spans too. The `debug` mode is best-effort, and emits everything available without the additional completeness checks. During import, the mode applies both an import filter and a completeness check. So exporting with `archival` but importing with `operational` will get you a pruned DB, lacking anything historical. Exporting with `operational` and importing with `replay` or `archival` will fail, because the newly-populated DB does not contain any historical artifacts. closes #8105
- Loading branch information
Showing
14 changed files
with
441 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.