@bastani/atomic 0.10.11-alpha.3 → 0.10.11-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +4 -4
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +4 -4
- package/dist/_shared/mode-shared-2QJSCUM6.js +4 -4
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/p1b-elig-TVB5CBLL.js +22 -6
- package/dist/_shared/p1b-elig-TVB5CBLL.js.map +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +6 -3
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/sdk-B5LEWGGI.js +899 -515
- package/dist/_shared/sdk-B5LEWGGI.js.map +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/{startup-0-0-EZUKEP4Q.js → startup-0-0-XJJDOIEC.js} +6 -12
- package/dist/_shared/{startup-0-0-EZUKEP4Q.js.map → startup-0-0-XJJDOIEC.js.map} +1 -1
- package/dist/_shared/{startup-0-1-RTOHJFDJ.js → startup-0-1-M6OWAYHH.js} +354 -103
- package/dist/_shared/startup-0-1-M6OWAYHH.js.map +1 -0
- package/dist/_shared/startup-0-2-5QHPCEON.js +18 -9
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +1 -1
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +4 -4
- package/dist/_shared/startup-0-4-ZMJV547D.js +4 -4
- package/dist/_shared/startup-0-5-YDW47QX6.js +4 -4
- package/dist/_shared/startup-10-0-TDQNBDDL.js +4 -4
- package/dist/_shared/startup-12-0-55AAXBJZ.js +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +2 -2
- package/dist/_shared/startup-15-0-YUKGAC63.js +2 -2
- package/dist/_shared/startup-15-1-4S7FLMNG.js +4 -4
- package/dist/_shared/startup-8-0-34CBHPZH.js +2114 -235
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +12 -12
- package/dist/_shared/storage-command-7MGXLJGZ.js +6 -6
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/storage-status-K7PX2RXA.js +2 -2
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +1 -1
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +19 -0
- package/dist/builtin/intercom/broker/broker.bundle.mjs +1020 -108
- package/dist/builtin/intercom/broker/client.ts +8 -0
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +91 -14
- package/dist/builtin/intercom/broker/multinode-router.ts +102 -17
- package/dist/builtin/intercom/broker/multinode-state-store.ts +41 -2
- package/dist/builtin/intercom/broker/send-order-gate.ts +5 -2
- package/dist/builtin/intercom/broker/sql-add-column.ts +22 -1
- package/dist/builtin/intercom/broker/sql-lease-store.ts +304 -48
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +541 -50
- package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +239 -8
- package/dist/builtin/intercom/broker/sql-retention.ts +11 -2
- package/dist/builtin/intercom/broker/sql-schema.ts +42 -8
- package/dist/builtin/intercom/index.bundle.mjs +13 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/skill-creator/eval-viewer/generate_review.py +8 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +2 -2
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +1 -1
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +2 -2
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +2 -2
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +4 -4
- package/dist/core/export-html/index.code.js.map +1 -1
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/process-start-token.d.ts +5 -4
- package/dist/core/sdk.code.js +2 -2
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +4 -4
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/database.d.ts +6 -0
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/fenced-paths.d.ts +7 -6
- package/dist/core/storage/fenced-paths.js +7 -6
- package/dist/core/storage/fenced-paths.js.map +1 -1
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +209 -19
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +435 -71
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/schema-catalog.d.ts +69 -7
- package/dist/core/storage/schema-catalog.js +352 -61
- package/dist/core/storage/schema-catalog.js.map +1 -1
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-detach.d.ts +11 -1
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-sweep.js +31 -7
- package/dist/core/storage/session/fork-sweep.js.map +1 -1
- package/dist/core/storage/session/fork-window.code.js +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-lock.d.ts +100 -0
- package/dist/core/storage/session/jsonl-session-store.d.ts +41 -23
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +8 -8
- package/dist/core/storage/session/released-history-files.code.js.map +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/session-search-index.d.ts +9 -1
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.d.ts +51 -7
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/sqlite-facade.d.ts +6 -0
- package/dist/core/storage/sqlite-facade.js +309 -33
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/storage/sqlite-open-batch.js +10 -0
- package/dist/core/storage/sqlite-open-batch.js.map +1 -0
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +3 -3
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.code.js +2 -2
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.d.ts +5 -3
- package/dist/core/worktree-snapshot/blob-store.js +151 -21
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/errors.code.js +2 -2
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/fork-snapshot-index.js +158 -41
- package/dist/core/worktree-snapshot/fork-snapshot-index.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +1 -1
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/package-manager-cli.code.js +4 -4
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/3.js +1 -1
- package/dist/startup-stages/5.js +1 -1
- package/dist/utils/startup-database-spare.code.js +2 -2
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/changelog.mdx +49 -0
- package/docs/storage/jsonl.md +3 -3
- package/package.json +8 -8
- package/dist/_shared/startup-0-1-RTOHJFDJ.js.map +0 -1
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { dialectOf } from "./dialect.js";
|
|
2
|
+
import { StorageSchemaVersionError } from "./errors.js";
|
|
2
3
|
import * as statementSequence from "./statement-sequence.js";
|
|
3
4
|
/**
|
|
4
|
-
* `transactionFinisher` of `statement-sequence.ts`, which the
|
|
5
|
-
* process an in-place update caught keeps
|
|
6
|
-
*
|
|
5
|
+
* `transactionFinisher`, `sequenceRunner` and `statementBatch` of `statement-sequence.ts`, which the copies 0.10.3 and
|
|
6
|
+
* 0.10.4 loaded lack: a process an in-place update caught keeps those copies, where a named import would fail to link.
|
|
7
|
+
* Without `statementBatch`, 0.10.3's connection thread cannot run `{ script: true }` entries inside a sequence request,
|
|
8
|
+
* so multi-statement scripts run via `tx.exec` instead.
|
|
7
9
|
*/
|
|
8
10
|
const finishers = statementSequence;
|
|
11
|
+
function createAsyncScopeStore() {
|
|
12
|
+
const proc = globalThis.process;
|
|
13
|
+
const Ctor = proc?.getBuiltinModule?.("async_hooks")?.AsyncLocalStorage;
|
|
14
|
+
return Ctor === undefined ? undefined : new Ctor();
|
|
15
|
+
}
|
|
9
16
|
const TABLE_KINDS = new Set(["r", "p", "v", "m", "f"]);
|
|
10
17
|
/**
|
|
11
18
|
* Every relation, trigger, column and function of the schema the statement runs in, in one statement and so one
|
|
@@ -56,22 +63,12 @@ async function readSqliteSchemaStamps(executor, ledger) {
|
|
|
56
63
|
stamps.set(row.domain, Number(row.revision ?? 0));
|
|
57
64
|
return stamps;
|
|
58
65
|
}
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
* transaction leaves it: a later open believes their revisions until the schema changes again (#6560). Creates the
|
|
62
|
-
* stamps table first, unless `options.tableExists`, so its own creation is part of the version recorded. With
|
|
63
|
-
* `options.last`, the stamps are the transaction's last statement: where its connection is pipelined, they go out with
|
|
64
|
-
* its commit. SQLite only; every stamp must share a ledger.
|
|
65
|
-
*/
|
|
66
|
-
export async function recordSqliteSchemaStamps(tx, stamps, options = {}) {
|
|
66
|
+
/** The SQLite statements that create (unless `tableExists`) and upsert `stamps` at the current `PRAGMA schema_version`. */
|
|
67
|
+
function sqliteStampStatements(stamps, tableExists) {
|
|
67
68
|
const ledger = stamps[0]?.ledger;
|
|
68
69
|
if (ledger === undefined)
|
|
69
|
-
return;
|
|
70
|
+
return [];
|
|
70
71
|
const table = sqliteSchemaStampTable(ledger);
|
|
71
|
-
if (options.tableExists !== true)
|
|
72
|
-
await tx.exec(`CREATE TABLE IF NOT EXISTS ${table} (domain TEXT NOT NULL PRIMARY KEY, revision INTEGER NOT NULL, schema_version INTEGER NOT NULL)`);
|
|
73
|
-
// The revision this transaction set up, even below a newer build's: the stamp says what was checked at this version.
|
|
74
|
-
// One statement for them all, so a server pays one request.
|
|
75
72
|
const upsert = {
|
|
76
73
|
sql: `INSERT INTO ${table} (domain, revision, schema_version)
|
|
77
74
|
SELECT column1, column2, (SELECT schema_version FROM pragma_schema_version)
|
|
@@ -79,9 +76,37 @@ export async function recordSqliteSchemaStamps(tx, stamps, options = {}) {
|
|
|
79
76
|
ON CONFLICT(domain) DO UPDATE SET revision = excluded.revision, schema_version = excluded.schema_version`,
|
|
80
77
|
params: stamps.flatMap(({ domain, revision }) => [stampKey(domain), revision]),
|
|
81
78
|
};
|
|
82
|
-
if (
|
|
79
|
+
if (tableExists)
|
|
80
|
+
return [upsert];
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
sql: `CREATE TABLE IF NOT EXISTS ${table} (domain TEXT NOT NULL PRIMARY KEY, revision INTEGER NOT NULL, schema_version INTEGER NOT NULL)`,
|
|
84
|
+
params: [],
|
|
85
|
+
script: true,
|
|
86
|
+
},
|
|
87
|
+
upsert,
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @internal Stamps each of `stamps`, in the transaction `tx` that ran their setups, with the schema version as that
|
|
92
|
+
* transaction leaves it: a later open believes their revisions until the schema changes again (#6560). Creates the
|
|
93
|
+
* stamps table first, unless `options.tableExists`, so its own creation is part of the version recorded. With
|
|
94
|
+
* `options.last`, the stamps are the transaction's last statements: where its connection is pipelined, they go out with
|
|
95
|
+
* its commit. SQLite only; every stamp must share a ledger.
|
|
96
|
+
*/
|
|
97
|
+
export async function recordSqliteSchemaStamps(tx, stamps, options = {}) {
|
|
98
|
+
const statements = sqliteStampStatements(stamps, options.tableExists === true);
|
|
99
|
+
if (statements.length === 0)
|
|
100
|
+
return;
|
|
101
|
+
const canSequence = finishers.statementBatch !== undefined || statements.every((each) => each.script !== true);
|
|
102
|
+
if (options.last === true && canSequence && finishers.transactionFinisher?.(tx)?.(statements) === true)
|
|
83
103
|
return;
|
|
84
|
-
|
|
104
|
+
for (const statement of statements) {
|
|
105
|
+
if (statement.script === true)
|
|
106
|
+
await tx.exec(statement.sql);
|
|
107
|
+
else
|
|
108
|
+
await tx.run(statement.sql, ...statement.params);
|
|
109
|
+
}
|
|
85
110
|
}
|
|
86
111
|
/** The catalog of a SQLite database, or undefined when it cannot be read, such as on a SQLite too old. */
|
|
87
112
|
async function readSqliteCatalog(database, ledger) {
|
|
@@ -206,18 +231,37 @@ export async function readStorageSchemaCatalog(database, ledger) {
|
|
|
206
231
|
};
|
|
207
232
|
}
|
|
208
233
|
const scopes = new WeakMap();
|
|
234
|
+
/**
|
|
235
|
+
* Tracks the root open batch active on each `CatalogScope` along the current async call chain: nested opens share their
|
|
236
|
+
* enclosing root's batch and commit together at the root's end, while concurrent sibling opens on the same database
|
|
237
|
+
* handle each own and commit their own batch before returning (#6709).
|
|
238
|
+
*/
|
|
239
|
+
const activeOpenBatches = createAsyncScopeStore();
|
|
240
|
+
/** How long a SQLite open batch polls `done` after `tryMaintenance` finds the lock busy before joining the queue. */
|
|
241
|
+
const SQLITE_BATCH_WAIT_MS = 1_000;
|
|
242
|
+
const SQLITE_BATCH_POLL_MS = 20;
|
|
243
|
+
const SQLITE_BATCH_MAX_POLL_MS = 250;
|
|
244
|
+
const pausePoll = (ms) => new Promise((resolve) => setTimeout(resolve, ms * (0.5 + Math.random() / 2)));
|
|
209
245
|
/**
|
|
210
246
|
* Runs `body`, an open of one or more stores on `database`, with one catalog read for all of them: the schema checks
|
|
211
247
|
* of the stores it opens ({@link schemaCatalogOf}) answer from it, so an open whose schema is current runs no schema
|
|
212
|
-
* transaction and takes no lock. Opens on `database` that overlap share the read.
|
|
213
|
-
*
|
|
248
|
+
* transaction and takes no lock. Opens on `database` that overlap share the read. On SQLite, setups queued inside the
|
|
249
|
+
* open ({@link queueSqliteSchemaSetup}) run in one write transaction before the root open returns (#6709). `views` are
|
|
250
|
+
* other handles on the same connection, such as a borrowed view, whose checks answer from the same read.
|
|
214
251
|
*/
|
|
215
252
|
export async function withStorageSchemaCatalog(database, ledger, body, views = []) {
|
|
216
253
|
let scope = scopes.get(database);
|
|
217
254
|
if (scope === undefined || scope.ledger !== ledger) {
|
|
218
255
|
const read = () => readStorageSchemaCatalog(database, ledger);
|
|
219
256
|
const catalog = dialectOf(database).name === "sqlite" ? undefined : read();
|
|
220
|
-
scope = {
|
|
257
|
+
scope = {
|
|
258
|
+
ledger,
|
|
259
|
+
catalog,
|
|
260
|
+
read,
|
|
261
|
+
users: 0,
|
|
262
|
+
stamps: undefined,
|
|
263
|
+
fallbackBatch: { ledger, setups: [], restamp: new Map() },
|
|
264
|
+
};
|
|
221
265
|
scopes.set(database, scope);
|
|
222
266
|
}
|
|
223
267
|
const shared = scope;
|
|
@@ -225,11 +269,25 @@ export async function withStorageSchemaCatalog(database, ledger, body, views = [
|
|
|
225
269
|
for (const handle of handles.slice(1))
|
|
226
270
|
scopes.set(handle, shared);
|
|
227
271
|
shared.users += 1;
|
|
228
|
-
|
|
272
|
+
const enclosing = activeOpenBatches?.getStore();
|
|
273
|
+
const isRoot = activeOpenBatches === undefined ? shared.users === 1 : enclosing?.has(shared) !== true;
|
|
274
|
+
const batch = activeOpenBatches === undefined
|
|
275
|
+
? shared.fallbackBatch
|
|
276
|
+
: isRoot
|
|
277
|
+
? { ledger, setups: [], restamp: new Map() }
|
|
278
|
+
: enclosing.get(shared);
|
|
279
|
+
const run = async () => {
|
|
229
280
|
const value = await body();
|
|
230
|
-
if (
|
|
231
|
-
await
|
|
281
|
+
if (isRoot && (batch.setups.length > 0 || batch.restamp.size > 0))
|
|
282
|
+
await flushOpenBatch(database, shared, batch);
|
|
232
283
|
return value;
|
|
284
|
+
};
|
|
285
|
+
try {
|
|
286
|
+
if (!isRoot || activeOpenBatches === undefined)
|
|
287
|
+
return await run();
|
|
288
|
+
const next = new Map(enclosing);
|
|
289
|
+
next.set(shared, batch);
|
|
290
|
+
return await activeOpenBatches.run(next, run);
|
|
233
291
|
}
|
|
234
292
|
finally {
|
|
235
293
|
shared.users -= 1;
|
|
@@ -246,8 +304,10 @@ export async function withStorageSchemaCatalog(database, ledger, body, views = [
|
|
|
246
304
|
*/
|
|
247
305
|
export function refreshStorageSchemaCatalog(database) {
|
|
248
306
|
const scope = scopes.get(database);
|
|
249
|
-
if (scope !== undefined)
|
|
307
|
+
if (scope !== undefined) {
|
|
250
308
|
scope.catalog = undefined;
|
|
309
|
+
scope.stamps = undefined;
|
|
310
|
+
}
|
|
251
311
|
}
|
|
252
312
|
/**
|
|
253
313
|
* Tells the catalog an open of `database` in progress read that the open created `tables` since, so the stores it
|
|
@@ -293,59 +353,290 @@ export async function sqliteSchemaStampsOf(database, ledger) {
|
|
|
293
353
|
: undefined);
|
|
294
354
|
return scope.stamps;
|
|
295
355
|
}
|
|
356
|
+
/** Active root open batch for `database` on SQLite (matching `ledger` when given), or undefined outside one. */
|
|
357
|
+
function activeBatchFor(database, ledger) {
|
|
358
|
+
if (dialectOf(database).name !== "sqlite")
|
|
359
|
+
return undefined;
|
|
360
|
+
const scope = scopes.get(database);
|
|
361
|
+
if (scope === undefined || (ledger !== undefined && scope.ledger !== ledger))
|
|
362
|
+
return undefined;
|
|
363
|
+
const batch = activeOpenBatches === undefined ? scope.fallbackBatch : activeOpenBatches.getStore()?.get(scope);
|
|
364
|
+
return batch === undefined ? undefined : { scope, batch };
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* @internal Queues `setup` into the active SQLite open scope (`withStorageSchemaCatalog`) so that all needed setups of
|
|
368
|
+
* the open execute in one write transaction before the open returns (#6709). Returns `false` outside a SQLite open
|
|
369
|
+
* scope (or for a different `ledger`), in which case the caller runs `setup` immediately.
|
|
370
|
+
*/
|
|
371
|
+
export function queueSqliteSchemaSetup(database, ledger, setup) {
|
|
372
|
+
const active = activeBatchFor(database, ledger);
|
|
373
|
+
if (active === undefined)
|
|
374
|
+
return false;
|
|
375
|
+
active.batch.setups.push(setup);
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* @internal Executes and commits any SQLite schema setups queued so far in the active open scope, before the open
|
|
380
|
+
* needs their committed tables or evaluated outcomes (#6709). No-op when nothing is queued or outside a SQLite open.
|
|
381
|
+
*/
|
|
382
|
+
export async function flushStorageSchemaSetups(database, ledger) {
|
|
383
|
+
const active = activeBatchFor(database, ledger);
|
|
384
|
+
if (active === undefined)
|
|
385
|
+
return;
|
|
386
|
+
if (active.batch.setups.length === 0 && active.batch.restamp.size === 0)
|
|
387
|
+
return;
|
|
388
|
+
await flushOpenBatch(database, active.scope, active.batch);
|
|
389
|
+
}
|
|
296
390
|
/**
|
|
297
391
|
* @internal Tells the open of `database` in progress that it checked `setup`, the schema setup `stamp` names, without
|
|
298
392
|
* its stamp (SQLite only): it ran it in a transaction that stamped it, found every object it creates in the
|
|
299
393
|
* catalog (with `verify`), or leaves it to the end (`deferred`). A schema change later in the same open, such as the
|
|
300
394
|
* next store's setup or a column it adds, leaves a stamp behind the schema version, and a store found in the catalog has
|
|
301
|
-
* none that is current, so the next open would check it again. The open's end
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* nothing is kept, outside such an open: the caller then runs `setup` as it would without stamps.
|
|
395
|
+
* none that is current, so the next open would check it again. The open's end checks or runs them in one transaction
|
|
396
|
+
* and stamps them all with the version it leaves: the next open of a current schema then takes no write lock and answers
|
|
397
|
+
* every such store from its stamp (#6560, #6709). False, and nothing is kept, outside such an open.
|
|
305
398
|
*/
|
|
306
399
|
export function restampStorageSchemaAtOpenEnd(database, stamp, setup, options = {}) {
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
400
|
+
const active = activeBatchFor(database, stamp.ledger);
|
|
401
|
+
if (active === undefined)
|
|
309
402
|
return false;
|
|
310
|
-
|
|
403
|
+
active.batch.restamp.set(stamp.domain, { stamp, setup, ...options });
|
|
311
404
|
return true;
|
|
312
405
|
}
|
|
313
406
|
/**
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
|
|
317
|
-
|
|
407
|
+
* Sends `writes` on `tx`, piggybacking onto `COMMIT` when `last` is true and the connection supports it. Returns
|
|
408
|
+
* `true` when sent via `transactionFinisher` (without per-statement `ignoreError` handling).
|
|
409
|
+
*/
|
|
410
|
+
async function sendBatchWrites(tx, writes, last) {
|
|
411
|
+
if (writes.length === 0)
|
|
412
|
+
return false;
|
|
413
|
+
const statements = writes.map(({ statement }) => statement);
|
|
414
|
+
const canSequence = finishers.statementBatch !== undefined || statements.every((each) => each.script !== true);
|
|
415
|
+
if (last && canSequence && finishers.transactionFinisher?.(tx)?.(statements) === true)
|
|
416
|
+
return true;
|
|
417
|
+
const runSequence = canSequence ? finishers.sequenceRunner?.(tx) : undefined;
|
|
418
|
+
if (runSequence !== undefined && writes.every(({ ignoreError }) => ignoreError === undefined)) {
|
|
419
|
+
await runSequence({ statements });
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
for (const { statement, ignoreError } of writes) {
|
|
423
|
+
try {
|
|
424
|
+
if (statement.script === true)
|
|
425
|
+
await tx.exec(statement.sql);
|
|
426
|
+
else
|
|
427
|
+
await tx.run(statement.sql, ...statement.params);
|
|
428
|
+
}
|
|
429
|
+
catch (error) {
|
|
430
|
+
if (ignoreError?.(error) !== true)
|
|
431
|
+
throw error;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Checks outside any write lock whether another host completed every queued setup and restamp in this open batch.
|
|
438
|
+
* Updates `scope.catalog` and `scope.stamps` when complete so later questions in the same open see the fresh schema.
|
|
318
439
|
*/
|
|
319
|
-
async function
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
440
|
+
async function batchCompletedElsewhere(database, scope, setups, restamps) {
|
|
441
|
+
const catalog = await readSqliteCatalog(database, scope.ledger);
|
|
442
|
+
if (catalog === undefined)
|
|
443
|
+
return false;
|
|
444
|
+
const stampTable = sqliteSchemaStampTable(scope.ledger);
|
|
445
|
+
const needsStamps = setups.some((each) => each.stamp !== undefined) || restamps.length > 0;
|
|
446
|
+
const stamps = needsStamps && catalog.hasTable(stampTable)
|
|
447
|
+
? await readSqliteSchemaStamps(database, scope.ledger).catch(() => undefined)
|
|
448
|
+
: undefined;
|
|
449
|
+
for (const entry of setups) {
|
|
450
|
+
if (entry.done !== undefined) {
|
|
451
|
+
if (!(await entry.done(catalog, stamps)))
|
|
452
|
+
return false;
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
if (entry.stamp !== undefined) {
|
|
456
|
+
if ((stamps?.get(stampKey(entry.stamp.domain)) ?? 0) < entry.stamp.revision)
|
|
457
|
+
return false;
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
if (entry.verify !== undefined) {
|
|
461
|
+
if (!entry.verify(catalog))
|
|
462
|
+
return false;
|
|
463
|
+
continue;
|
|
464
|
+
}
|
|
465
|
+
return false;
|
|
466
|
+
}
|
|
467
|
+
for (const entry of restamps) {
|
|
468
|
+
if (entry.alongside === true && setups.length === 0)
|
|
469
|
+
continue;
|
|
470
|
+
if ((stamps?.get(stampKey(entry.stamp.domain)) ?? 0) < entry.stamp.revision)
|
|
471
|
+
return false;
|
|
472
|
+
}
|
|
473
|
+
scope.catalog = Promise.resolve(catalog);
|
|
474
|
+
scope.stamps = stamps === undefined ? undefined : Promise.resolve(stamps);
|
|
475
|
+
return true;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Runs every queued setup and restamp of `batch` in ONE SQLite write transaction through `tryMaintenance`, polling
|
|
479
|
+
* `batchCompletedElsewhere` when another host holds the lock and falling back to a normal serial transaction after
|
|
480
|
+
* {@link SQLITE_BATCH_WAIT_MS} (#6709).
|
|
481
|
+
*/
|
|
482
|
+
async function flushOpenBatch(database, scope, batch) {
|
|
483
|
+
const setups = batch.setups.splice(0);
|
|
484
|
+
const pendingRestamps = [...batch.restamp.values()];
|
|
485
|
+
batch.restamp.clear();
|
|
486
|
+
if (setups.length === 0 && pendingRestamps.every((each) => each.alongside === true))
|
|
323
487
|
return;
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
488
|
+
const required = setups.length > 0 || pendingRestamps.some((each) => each.deferred === true);
|
|
489
|
+
const hasOptional = setups.some((each) => each.optional === true);
|
|
490
|
+
const stampTable = sqliteSchemaStampTable(scope.ledger);
|
|
491
|
+
let ignoreErrorPredicates = [];
|
|
492
|
+
let usedFinisher = false;
|
|
493
|
+
const runTransaction = async (tx, isolateOptional) => {
|
|
494
|
+
ignoreErrorPredicates = [];
|
|
495
|
+
usedFinisher = false;
|
|
496
|
+
for (const entry of setups)
|
|
497
|
+
entry.reset?.();
|
|
498
|
+
const catalog = await readSqliteCatalog(tx, scope.ledger);
|
|
499
|
+
const writes = [];
|
|
500
|
+
const addedColumns = new Set();
|
|
501
|
+
const createdTables = new Set();
|
|
502
|
+
const flushWrites = async () => {
|
|
503
|
+
if (writes.length === 0)
|
|
504
|
+
return;
|
|
505
|
+
const batchWrites = writes.splice(0);
|
|
506
|
+
await sendBatchWrites(tx, batchWrites, false);
|
|
507
|
+
};
|
|
508
|
+
const context = {
|
|
509
|
+
tx,
|
|
510
|
+
catalog,
|
|
511
|
+
enqueue(statement, options) {
|
|
512
|
+
const sequenced = typeof statement === "string" ? { sql: statement, params: [], script: true } : statement;
|
|
513
|
+
if (options?.ignoreError !== undefined)
|
|
514
|
+
ignoreErrorPredicates.push(options.ignoreError);
|
|
515
|
+
writes.push({
|
|
516
|
+
statement: sequenced,
|
|
517
|
+
...(options?.ignoreError === undefined ? {} : { ignoreError: options.ignoreError }),
|
|
518
|
+
});
|
|
519
|
+
},
|
|
520
|
+
flushWrites,
|
|
521
|
+
noteColumnAdded(table, column) {
|
|
522
|
+
addedColumns.add(`${table}\0${column}`);
|
|
523
|
+
},
|
|
524
|
+
hasColumn(table, column) {
|
|
525
|
+
return catalog?.hasColumn(table, column) === true || addedColumns.has(`${table}\0${column}`);
|
|
526
|
+
},
|
|
527
|
+
noteTableCreated(table) {
|
|
528
|
+
createdTables.add(table);
|
|
529
|
+
},
|
|
530
|
+
createdTable(table) {
|
|
531
|
+
return createdTables.has(table);
|
|
532
|
+
},
|
|
533
|
+
tableExisted(table) {
|
|
534
|
+
return catalog?.hasTable(table) === true;
|
|
535
|
+
},
|
|
536
|
+
};
|
|
537
|
+
for (const entry of setups) {
|
|
538
|
+
if (!isolateOptional || entry.optional !== true) {
|
|
539
|
+
await entry.run(context);
|
|
540
|
+
continue;
|
|
541
|
+
}
|
|
542
|
+
await flushWrites();
|
|
543
|
+
await tx.exec("SAVEPOINT atomic_optional_schema_setup");
|
|
544
|
+
try {
|
|
545
|
+
await entry.run(context);
|
|
546
|
+
await flushWrites();
|
|
547
|
+
}
|
|
548
|
+
catch {
|
|
549
|
+
writes.length = 0;
|
|
550
|
+
await tx.exec("ROLLBACK TO SAVEPOINT atomic_optional_schema_setup");
|
|
551
|
+
entry.onFailure?.();
|
|
552
|
+
}
|
|
553
|
+
await tx.exec("RELEASE SAVEPOINT atomic_optional_schema_setup");
|
|
554
|
+
}
|
|
555
|
+
for (const { setup, verify, deferred } of pendingRestamps) {
|
|
556
|
+
if (deferred === true || verify === undefined || catalog === undefined || !verify(catalog)) {
|
|
557
|
+
await flushWrites();
|
|
558
|
+
await setup(tx);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
// Collect stamps for every stamped setup and restamp in this batch (deduplicated by domain, keeping highest revision).
|
|
562
|
+
const stampByDomain = new Map();
|
|
563
|
+
for (const entry of setups) {
|
|
564
|
+
if (entry.stamp === undefined)
|
|
565
|
+
continue;
|
|
566
|
+
const prev = stampByDomain.get(entry.stamp.domain);
|
|
567
|
+
if (prev === undefined || entry.stamp.revision > prev.revision)
|
|
568
|
+
stampByDomain.set(entry.stamp.domain, entry.stamp);
|
|
569
|
+
}
|
|
570
|
+
for (const entry of pendingRestamps) {
|
|
571
|
+
const prev = stampByDomain.get(entry.stamp.domain);
|
|
572
|
+
if (prev === undefined || entry.stamp.revision > prev.revision)
|
|
573
|
+
stampByDomain.set(entry.stamp.domain, entry.stamp);
|
|
574
|
+
}
|
|
575
|
+
if (stampByDomain.size > 0) {
|
|
576
|
+
const stampStmts = sqliteStampStatements([...stampByDomain.values()], catalog?.hasTable(stampTable) === true);
|
|
577
|
+
for (const statement of stampStmts)
|
|
578
|
+
writes.push({ statement });
|
|
579
|
+
}
|
|
580
|
+
usedFinisher = await sendBatchWrites(tx, writes.splice(0), !isolateOptional);
|
|
581
|
+
};
|
|
582
|
+
const executeOnce = async (isolateOptional) => {
|
|
583
|
+
const waiting = () => database.transaction((tx) => runTransaction(tx, isolateOptional), {
|
|
584
|
+
retryTransientFailures: true,
|
|
585
|
+
concurrency: { kind: "serial", domain: scope.ledger },
|
|
586
|
+
});
|
|
587
|
+
const tryMaintenance = database.tryMaintenance?.bind(database);
|
|
588
|
+
if (tryMaintenance === undefined) {
|
|
589
|
+
await waiting();
|
|
590
|
+
scope.catalog = undefined;
|
|
591
|
+
scope.stamps = undefined;
|
|
335
592
|
return;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
593
|
+
}
|
|
594
|
+
const deadline = performance.now() + SQLITE_BATCH_WAIT_MS;
|
|
595
|
+
for (let wait = SQLITE_BATCH_POLL_MS;; wait = Math.min(wait * 2, SQLITE_BATCH_MAX_POLL_MS)) {
|
|
596
|
+
const won = await tryMaintenance((tx) => runTransaction(tx, isolateOptional));
|
|
597
|
+
if (won) {
|
|
598
|
+
scope.catalog = undefined;
|
|
599
|
+
scope.stamps = undefined;
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
if (performance.now() >= deadline) {
|
|
603
|
+
await waiting();
|
|
604
|
+
scope.catalog = undefined;
|
|
605
|
+
scope.stamps = undefined;
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
await pausePoll(wait);
|
|
609
|
+
if (await batchCompletedElsewhere(database, scope, setups, pendingRestamps))
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
try {
|
|
614
|
+
// Pure restamp housekeeping (no queued setups, no deferred seeds): check current stamps first if any entry lacks
|
|
615
|
+
// `verify`, sparing an open that changed nothing since its setups a write transaction.
|
|
616
|
+
if (setups.length === 0 && !required && pendingRestamps.some((each) => each.verify === undefined)) {
|
|
617
|
+
const current = await readSqliteSchemaStamps(database, scope.ledger).catch(() => new Map());
|
|
618
|
+
const behind = pendingRestamps.filter(({ stamp }) => (current.get(stampKey(stamp.domain)) ?? 0) < stamp.revision);
|
|
619
|
+
if (behind.length === 0)
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
await executeOnce(false);
|
|
344
623
|
}
|
|
345
624
|
catch (error) {
|
|
346
|
-
|
|
625
|
+
const retryIgnored = usedFinisher && ignoreErrorPredicates.some((match) => match(error));
|
|
626
|
+
if ((hasOptional || retryIgnored) && !(error instanceof StorageSchemaVersionError)) {
|
|
627
|
+
try {
|
|
628
|
+
await executeOnce(true);
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
catch (retryError) {
|
|
632
|
+
if (required)
|
|
633
|
+
throw retryError;
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
if (required)
|
|
347
638
|
throw error;
|
|
348
|
-
//
|
|
639
|
+
// Pure housekeeping restamp failure: the next open checks those stores again.
|
|
349
640
|
}
|
|
350
641
|
}
|
|
351
642
|
//# sourceMappingURL=schema-catalog.js.map
|