@intentius/chant-lexicon-sql 0.114.1 → 0.116.0
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/dist/clickhouse/apply/mutations.d.ts +7 -1
- package/dist/clickhouse/apply/mutations.d.ts.map +1 -1
- package/dist/clickhouse/container.d.ts +22 -7
- package/dist/clickhouse/container.d.ts.map +1 -1
- package/dist/clickhouse/plan/deep.d.ts +5 -0
- package/dist/clickhouse/plan/deep.d.ts.map +1 -1
- package/dist/clickhouse/plan/normalize.d.ts.map +1 -1
- package/dist/clickhouse/rebuild/backfill.d.ts +11 -5
- package/dist/clickhouse/rebuild/backfill.d.ts.map +1 -1
- package/dist/clickhouse/rebuild/op.d.ts +29 -0
- package/dist/clickhouse/rebuild/op.d.ts.map +1 -1
- package/dist/clickhouse/rebuild/partitions.d.ts +8 -0
- package/dist/clickhouse/rebuild/partitions.d.ts.map +1 -1
- package/dist/clickhouse/rebuild/receipts.d.ts +4 -6
- package/dist/clickhouse/rebuild/receipts.d.ts.map +1 -1
- package/dist/clickhouse/rebuild/shards.d.ts +59 -0
- package/dist/clickhouse/rebuild/shards.d.ts.map +1 -0
- package/dist/clickhouse/rebuild/steps.d.ts +3 -0
- package/dist/clickhouse/rebuild/steps.d.ts.map +1 -1
- package/dist/clickhouse/rebuild/verify.d.ts +4 -0
- package/dist/clickhouse/rebuild/verify.d.ts.map +1 -1
- package/dist/codegen/registry.d.ts.map +1 -1
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/core/receipts.d.ts +5 -3
- package/dist/core/receipts.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +5 -5
- package/dist/lint/rules/sqlpg001.d.ts.map +1 -1
- package/dist/lsp/postgres-template.d.ts.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/meta.json +15 -0
- package/dist/okf/index.md +3 -0
- package/dist/okf/types/PostgresFunction.md +9 -0
- package/dist/okf/types/PostgresProcedure.md +9 -0
- package/dist/okf/types/PostgresTrigger.md +9 -0
- package/dist/op/activities/clickhouse-rebuild.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +13 -1
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/sql-exec.d.ts +41 -0
- package/dist/op/activities/sql-exec.d.ts.map +1 -0
- package/dist/op/activity-contracts.d.ts +20 -0
- package/dist/op/activity-contracts.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/postgres/apply/apply.d.ts +6 -1
- package/dist/postgres/apply/apply.d.ts.map +1 -1
- package/dist/postgres/apply/statements.d.ts +9 -2
- package/dist/postgres/apply/statements.d.ts.map +1 -1
- package/dist/postgres/entities.d.ts +110 -3
- package/dist/postgres/entities.d.ts.map +1 -1
- package/dist/postgres/entity-types.d.ts +3 -0
- package/dist/postgres/entity-types.d.ts.map +1 -1
- package/dist/postgres/import/generator.d.ts.map +1 -1
- package/dist/postgres/import/live-export.d.ts.map +1 -1
- package/dist/postgres/live/catalog.d.ts +17 -5
- package/dist/postgres/live/catalog.d.ts.map +1 -1
- package/dist/postgres/live/describe-resources.d.ts +6 -1
- package/dist/postgres/live/describe-resources.d.ts.map +1 -1
- package/dist/postgres/migrate/receipts.d.ts +8 -5
- package/dist/postgres/migrate/receipts.d.ts.map +1 -1
- package/dist/postgres/parser.d.ts +82 -5
- package/dist/postgres/parser.d.ts.map +1 -1
- package/dist/postgres/plan/deep.d.ts.map +1 -1
- package/dist/postgres/plan/diff.d.ts +1 -1
- package/dist/postgres/plan/diff.d.ts.map +1 -1
- package/dist/postgres/plan/normalize.d.ts +21 -2
- package/dist/postgres/plan/normalize.d.ts.map +1 -1
- package/dist/postgres/plan/rules.d.ts +6 -0
- package/dist/postgres/plan/rules.d.ts.map +1 -1
- package/dist/postgres/plan/schema.d.ts +11 -1
- package/dist/postgres/plan/schema.d.ts.map +1 -1
- package/dist/postgres/plan/server-normalize.d.ts.map +1 -1
- package/dist/postgres.d.ts +1 -1
- package/dist/postgres.d.ts.map +1 -1
- package/dist/receipts.d.ts +102 -0
- package/dist/receipts.d.ts.map +1 -0
- package/dist/rules/postgres-templates.ts +2 -2
- package/dist/rules/sqlpg001.ts +3 -0
- package/dist/validate.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/clickhouse/apply/mutations.ts +9 -3
- package/src/clickhouse/container.ts +39 -11
- package/src/clickhouse/plan/cluster-drift.e2e.test.ts +117 -0
- package/src/clickhouse/plan/deep.ts +102 -3
- package/src/clickhouse/plan/normalize.ts +10 -0
- package/src/clickhouse/plan/plan.test.ts +10 -0
- package/src/clickhouse/rebuild/backfill.ts +85 -42
- package/src/clickhouse/rebuild/op.ts +80 -35
- package/src/clickhouse/rebuild/partitions.ts +11 -0
- package/src/clickhouse/rebuild/rebuild-sharded.e2e.test.ts +161 -0
- package/src/clickhouse/rebuild/rebuild.e2e.test.ts +110 -4
- package/src/clickhouse/rebuild/rebuild.test.ts +56 -4
- package/src/clickhouse/rebuild/receipts.ts +4 -6
- package/src/clickhouse/rebuild/shards.ts +104 -0
- package/src/clickhouse/rebuild/steps.ts +4 -0
- package/src/clickhouse/rebuild/verify.ts +14 -5
- package/src/codegen/postgres-classifier-page.ts +1 -1
- package/src/codegen/registry.ts +3 -0
- package/src/config.ts +7 -0
- package/src/core/receipts.ts +5 -3
- package/src/generated/lexicon-sql.json +15 -0
- package/src/index.ts +1 -1
- package/src/lint/rules/postgres-templates.ts +2 -2
- package/src/lint/rules/sqlpg001.ts +3 -0
- package/src/lsp/postgres-template.ts +6 -0
- package/src/mcp/postgres.ts +1 -1
- package/src/op/activities/clickhouse-rebuild.ts +32 -7
- package/src/op/activities/index.ts +21 -4
- package/src/op/activities/sql-exec.ts +84 -0
- package/src/op/activity-contracts.ts +15 -0
- package/src/op/effect-receipts.e2e.test.ts +277 -0
- package/src/plugin.ts +3 -0
- package/src/postgres/apply/apply.ts +21 -5
- package/src/postgres/apply/statements.ts +53 -11
- package/src/postgres/entities.ts +332 -9
- package/src/postgres/entity-types.ts +3 -0
- package/src/postgres/import/generator.ts +5 -2
- package/src/postgres/import/live-export.ts +4 -0
- package/src/postgres/live/catalog.ts +81 -5
- package/src/postgres/live/describe-resources.ts +17 -7
- package/src/postgres/live/routines.e2e.test.ts +173 -0
- package/src/postgres/migrate/batches.e2e.test.ts +2 -1
- package/src/postgres/migrate/migrate.e2e.test.ts +2 -1
- package/src/postgres/migrate/migrate.test.ts +3 -2
- package/src/postgres/migrate/receipts.ts +18 -10
- package/src/postgres/parser.ts +314 -8
- package/src/postgres/plan/commands.ts +2 -2
- package/src/postgres/plan/deep.ts +57 -17
- package/src/postgres/plan/diff.ts +46 -6
- package/src/postgres/plan/normalize.ts +158 -4
- package/src/postgres/plan/rules.ts +36 -0
- package/src/postgres/plan/schema.ts +25 -6
- package/src/postgres/plan/server-normalize.ts +24 -0
- package/src/postgres/routines.test.ts +150 -0
- package/src/postgres.ts +11 -0
- package/src/receipts.test.ts +91 -0
- package/src/receipts.ts +259 -0
- package/src/skill-defs.ts +1 -1
- package/src/skills/chant-sql-postgres.md +18 -2
- package/src/skills/chant-sql-rebuild.md +5 -1
- package/src/validate.ts +3 -0
|
@@ -29,13 +29,19 @@ export declare class MutationFailedError extends Error {
|
|
|
29
29
|
constructor(table: string, mutationId: string, reason: string);
|
|
30
30
|
}
|
|
31
31
|
/** The table's mutations that are not done. */
|
|
32
|
-
export declare function pendingMutations(endpoint: ClickHouseEndpoint, database: string, table: string): Promise<PendingMutation[]>;
|
|
32
|
+
export declare function pendingMutations(endpoint: ClickHouseEndpoint, database: string, table: string, source?: string): Promise<PendingMutation[]>;
|
|
33
33
|
export interface WaitOptions {
|
|
34
34
|
/** How long to wait in all. Default: ten minutes. */
|
|
35
35
|
timeoutMs?: number;
|
|
36
36
|
/** First poll interval; it doubles up to two seconds. Default: 100ms. */
|
|
37
37
|
intervalMs?: number;
|
|
38
38
|
signal?: AbortSignal;
|
|
39
|
+
/**
|
|
40
|
+
* Where the mutations are listed. Default: `system.mutations`, this
|
|
41
|
+
* server's. A rebuild across the shards of a cluster waits on every
|
|
42
|
+
* server's, `clusterAllReplicas('<cluster>', system.mutations)` (#3663).
|
|
43
|
+
*/
|
|
44
|
+
source?: string;
|
|
39
45
|
}
|
|
40
46
|
/**
|
|
41
47
|
* Wait until the table has no unfinished mutation. Returns the ids waited on.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/apply/mutations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGnE,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,4GAA4G;AAC5G,qBAAa,oBAAqB,SAAQ,KAAK;IAE3C,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAFjB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EAAE,EACrB,SAAS,EAAE,MAAM;CAQ7B;AAED,mGAAmG;AACnG,qBAAa,mBAAoB,SAAQ,KAAK;IAE1C,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM;gBAFd,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM;CAQ1B;AAED,+CAA+C;AAC/C,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,
|
|
1
|
+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E,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiB/I"}
|
|
@@ -26,8 +26,16 @@ export declare function startScratchServer(image: string, options?: {
|
|
|
26
26
|
readyTimeoutMs?: number;
|
|
27
27
|
}): Promise<ScratchServer>;
|
|
28
28
|
export interface ScratchCluster {
|
|
29
|
-
/** One endpoint per
|
|
29
|
+
/** One endpoint per server, in order: shard 1's replicas first (`r1`, `r2`, ...), then shard 2's. */
|
|
30
30
|
replicas: ClickHouseEndpoint[];
|
|
31
|
+
/** Each server's shard and replica macros, in the order of `replicas`. */
|
|
32
|
+
layout: Array<{
|
|
33
|
+
shard: string;
|
|
34
|
+
replica: string;
|
|
35
|
+
host: string;
|
|
36
|
+
}>;
|
|
37
|
+
/** The cluster `remote_servers` defines over every server: `ON CLUSTER` and `cluster:<name>` name it. */
|
|
38
|
+
cluster: string;
|
|
31
39
|
/** The containers' common name prefix, for a log line. */
|
|
32
40
|
name: string;
|
|
33
41
|
/** Remove the containers and their network. Safe to call twice. */
|
|
@@ -46,17 +54,24 @@ export interface ScratchCluster {
|
|
|
46
54
|
startReplica(index: number): Promise<ClickHouseEndpoint>;
|
|
47
55
|
}
|
|
48
56
|
/**
|
|
49
|
-
* Start
|
|
50
|
-
*
|
|
57
|
+
* Start servers of `image` on their own Docker network, and wait until each
|
|
58
|
+
* answers and reaches Keeper: `replicas` servers as one shard of replicas,
|
|
59
|
+
* or, with `shards`, that many replicas in each shard (`[2, 1]` is a shard of
|
|
60
|
+
* two replicas and a shard of one server).
|
|
51
61
|
*
|
|
52
62
|
* Keeper is the server's embedded one (`keeper_server`), run by the first
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* a `Replicated` database's
|
|
56
|
-
*
|
|
63
|
+
* server, so the pinned server image and its digest pin Keeper too. Each
|
|
64
|
+
* server gets the macros `{shard}` = `s<n>` and `{replica}` = `r<n>` (the
|
|
65
|
+
* replica numbered within its shard), which a `Replicated` database's and a
|
|
66
|
+
* `Replicated*MergeTree`'s arguments name, and `remote_servers` defines the
|
|
67
|
+
* cluster `cluster` (default `chant`) over all of them, with
|
|
68
|
+
* `internal_replication`, so `ON CLUSTER` reaches every server. Configuration
|
|
69
|
+
* is copied into each container before it starts, with no bind mount.
|
|
57
70
|
*/
|
|
58
71
|
export declare function startScratchCluster(image: string, options?: {
|
|
59
72
|
replicas?: number;
|
|
73
|
+
shards?: number[];
|
|
74
|
+
cluster?: string;
|
|
60
75
|
namePrefix?: string;
|
|
61
76
|
readyTimeoutMs?: number;
|
|
62
77
|
}): Promise<ScratchCluster>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/clickhouse/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAmC,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAGlF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7D,OAAO,CAAC,aAAa,CAAC,CAYxB;AAED,MAAM,WAAW,cAAc;IAC7B,
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/clickhouse/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAmC,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAGlF,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,CAAC,EAAE,MAAM,CAAA;CAAO,GACrH,OAAO,CAAC,cAAc,CAAC,CA4GzB"}
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
* `deepNormalizationHooks` prunes what is not a property of the object (the
|
|
13
13
|
* DDL text, the template source, lineage, a view's reads and `TO` target).
|
|
14
14
|
* `chant sql plan` covers the target, and classifies every change.
|
|
15
|
+
*
|
|
16
|
+
* On a `cluster:<name>` topology every replica of every shard is read
|
|
17
|
+
* (#3664). When a server's copy of a table differs from the profile
|
|
18
|
+
* server's, that copy is what is reported, with the server in `observedOn`,
|
|
19
|
+
* which the drift report prints as `seen on`.
|
|
15
20
|
*/
|
|
16
21
|
import { type DeepObservationResult, type DeepNormalizationHooks } from "@intentius/chant/deep-observation";
|
|
17
22
|
import { type BindOptions } from "../live/bind.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/plan/deep.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deep.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/plan/deep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAmB,KAAK,qBAAqB,EAAgC,KAAK,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3J,OAAO,EAA6C,KAAK,WAAW,EAAyB,MAAM,cAAc,CAAC;AAMlH,OAAO,EAAyC,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAG1F,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAKrC,eAAO,MAAM,yBAAyB,EAAE,sBAEvC,CAAC;AAaF,uGAAuG;AACvG,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,KAAK,CA+BhH;AAqED,wBAAsB,oBAA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EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA2BD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,wCAAwC,CAAC;AAC1E,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AASlD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CA8B9E;AAgBD,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAWD,8DAA8D;AAC9D,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASnD;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAIvE;AA4BD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,SAAY,GAAG,eAAe,CA2FzF"}
|
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
* either finds nothing that replica alone has and returns, or stops the step
|
|
43
43
|
* naming it (`./replicas.ts`).
|
|
44
44
|
*
|
|
45
|
+
* On a cluster of more than one shard (#3663) the unit is a partition on one
|
|
46
|
+
* shard: read from that shard, written back to it, cleared on it alone, with
|
|
47
|
+
* its own receipt (`./shards.ts`), so a rerun after a failure on one shard
|
|
48
|
+
* skips what every shard already copied.
|
|
49
|
+
*
|
|
45
50
|
* In materialized-view mode a partition is copied in two parts
|
|
46
51
|
* (INTENTIUS/sql-yodeler#45). The rows before the cut-over are copied as
|
|
47
52
|
* above. The rows at or after it are the view's only when they were written
|
|
@@ -60,6 +65,7 @@
|
|
|
60
65
|
import { type ClickHouseReceiptStore } from "./receipts.js";
|
|
61
66
|
import { type RebuildObservation } from "./observe.js";
|
|
62
67
|
import { type RebuildRun } from "./steps.js";
|
|
68
|
+
import { type Shard } from "./shards.js";
|
|
63
69
|
export interface BackfillResult {
|
|
64
70
|
state: RebuildObservation["state"];
|
|
65
71
|
/** Partitions of the old table. */
|
|
@@ -74,14 +80,14 @@ export interface BackfillResult {
|
|
|
74
80
|
repaired: number;
|
|
75
81
|
}
|
|
76
82
|
/** The effect a partition's copy is, and its receipt's address suffix. */
|
|
77
|
-
export declare const partitionEffect: (key: string, partition: string) => string;
|
|
78
|
-
/** The receipt's expected value for one partition's copy. */
|
|
79
|
-
export declare function partitionExpectation(o: RebuildObservation, partition: string, cutover: number | undefined): string;
|
|
83
|
+
export declare const partitionEffect: (key: string, partition: string, shard?: Shard) => string;
|
|
84
|
+
/** The receipt's expected value for one partition's copy, on one shard of a cluster when `shard` is given. */
|
|
85
|
+
export declare function partitionExpectation(o: RebuildObservation, partition: string, cutover: number | undefined, shard?: Shard): string;
|
|
80
86
|
export interface BackfillDeps {
|
|
81
87
|
/** The receipt store. Default: the receipts table on the target server. */
|
|
82
88
|
receipts?: ClickHouseReceiptStore;
|
|
83
|
-
/** Called after each partition is copied and its receipt written; a test interrupts the backfill here. */
|
|
84
|
-
afterPartition?: (partition: string) => void | Promise<void>;
|
|
89
|
+
/** Called after each partition is copied and its receipt written, with its shard on a cluster of shards; a test interrupts the backfill here. */
|
|
90
|
+
afterPartition?: (partition: string, shard?: number) => void | Promise<void>;
|
|
85
91
|
}
|
|
86
92
|
export declare function backfill(run: RebuildRun, deps?: BackfillDeps): Promise<BackfillResult>;
|
|
87
93
|
//# sourceMappingURL=backfill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backfill.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/backfill.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"backfill.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/backfill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAKH,OAAO,EAA0C,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAkB,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAIpE,OAAO,EAAkE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1G,OAAO,EAAgG,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAGpI,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnC,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAC;IAChB,kJAAkJ;IAClJ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM,EAAE,QAAQ,KAAK,KAAG,MAAmG,CAAC;AAEpL,8GAA8G;AAC9G,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAkBjI;AAED,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,iJAAiJ;IACjJ,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E;AAED,wBAAsB,QAAQ,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CA4GhG"}
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
* | Drop | the old table, once its date has passed |
|
|
26
26
|
* | onFailure | drop the new table and the dual-write view |
|
|
27
27
|
*
|
|
28
|
+
* `gates: "outer"` (#3658) leaves out both approval gates and the Drop phase,
|
|
29
|
+
* for a caller that runs the Op under an approval of its own: the run goes
|
|
30
|
+
* from Plan to Retain, verification and the swap's own comparison included.
|
|
31
|
+
* `onFailure: "keep"` leaves out the onFailure, so a failed run's next run
|
|
32
|
+
* resumes the backfill from its receipts instead of starting again.
|
|
33
|
+
*
|
|
28
34
|
* Run it until it is done: each run goes as far as the next gate. Every step
|
|
29
35
|
* re-reads the server, so a run after a gate, a crash or an approval picks up
|
|
30
36
|
* where the last stopped. A run killed during the backfill (Ctrl-C, a lost
|
|
@@ -52,6 +58,27 @@ export interface ClickHouseRebuildOpConfig {
|
|
|
52
58
|
build?: boolean;
|
|
53
59
|
/** How long the old table is kept after the swap, as a duration (`7d`, `36h`). Default: `7d`. */
|
|
54
60
|
retain?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Whose approval the swap and the drop wait for. `"own"` (the default): the
|
|
63
|
+
* Op's two gates. `"outer"`: an approval the caller already holds for a
|
|
64
|
+
* larger change that runs this Op as one of its steps. The swap gate, the
|
|
65
|
+
* drop gate and the Drop phase are left out, so the Op ends at Retain with
|
|
66
|
+
* the old table kept as `<table>__chant_old` with its retention date. Drop
|
|
67
|
+
* it after that date, or run the Op with `"own"`: its swap gate has
|
|
68
|
+
* nothing left to swap, and its drop gate binds that old table.
|
|
69
|
+
* The verification still runs, and the swap compares the tables again
|
|
70
|
+
* before the `EXCHANGE`: any difference fails the run with nothing swapped.
|
|
71
|
+
* App mode's writes-stopped gate is not an approval and stays.
|
|
72
|
+
*/
|
|
73
|
+
gates?: "own" | "outer";
|
|
74
|
+
/**
|
|
75
|
+
* What a failed run does with the new table and the dual-write view.
|
|
76
|
+
* `"drop"` (the default): onFailure drops them, and the next run starts
|
|
77
|
+
* again from a new table. `"keep"`: there is no onFailure, and the next run
|
|
78
|
+
* resumes the backfill from its per-partition receipts. To start again
|
|
79
|
+
* instead, drop `<table>__chant_new` and `<table>__chant_dual`.
|
|
80
|
+
*/
|
|
81
|
+
onFailure?: "drop" | "keep";
|
|
55
82
|
/** The gate before the swap. Default name `approve-<name>`. */
|
|
56
83
|
gate?: {
|
|
57
84
|
gate?: string;
|
|
@@ -103,6 +130,8 @@ export interface ClickHouseRebuildArgs {
|
|
|
103
130
|
stack?: string;
|
|
104
131
|
ownershipEnv?: string;
|
|
105
132
|
cwd?: string;
|
|
133
|
+
/** A failed run keeps the new table (`onFailure: "keep"`): a refusal says to drop it by hand. */
|
|
134
|
+
keepOnFailure?: boolean;
|
|
106
135
|
}
|
|
107
136
|
export declare function ClickHouseRebuildOp(config: ClickHouseRebuildOpConfig): ClickHouseRebuildOpResources;
|
|
108
137
|
//# sourceMappingURL=op.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/op.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"op.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAyC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,W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CAAC;IACxB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iGAAiG;IACjG,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,4BAA4B,CAqHnG"}
|
|
@@ -12,8 +12,16 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { ClickHouseTarget } from "../live/bind.js";
|
|
14
14
|
import type { CopiedColumn, RebuildNames } from "./observe.js";
|
|
15
|
+
import type { Sharding } from "./shards.js";
|
|
15
16
|
/** The old table's active partitions, by id. */
|
|
16
17
|
export declare function sourcePartitions(target: ClickHouseTarget, names: RebuildNames): Promise<string[]>;
|
|
18
|
+
/** The old table's active partitions on each shard of a cluster (#3663), through this server. */
|
|
19
|
+
export declare function shardPartitions(run: {
|
|
20
|
+
target: ClickHouseTarget;
|
|
21
|
+
}, sharding: Sharding, database: string, table: string): Promise<Array<{
|
|
22
|
+
shard: number;
|
|
23
|
+
partition: string;
|
|
24
|
+
}>>;
|
|
17
25
|
/** Rename the columns an expression names, old name to new, leaving function names and qualified names alone. */
|
|
18
26
|
export declare function renameColumns(expr: string, copied: readonly CopiedColumn[]): string;
|
|
19
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partitions.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/partitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"partitions.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/partitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,gDAAgD;AAChD,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAOvG;AAED,iGAAiG;AACjG,wBAAsB,eAAe,CAAC,GAAG,EAAE;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAOlL;AAED,iHAAiH;AACjH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAQnF;AAeD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAKjH"}
|
|
@@ -21,12 +21,10 @@
|
|
|
21
21
|
*
|
|
22
22
|
* The store implements core's `ReceiptStore` seam
|
|
23
23
|
* (`@intentius/chant/op/receipt-store`), as the sql lexicon's shared
|
|
24
|
-
* `SqlReceiptStore` (`../../core/receipts.ts`).
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* `effect()` steps
|
|
28
|
-
* activity reaches the store directly, the way the fly lexicon's release
|
|
29
|
-
* component reaches its own.
|
|
24
|
+
* `SqlReceiptStore` (`../../core/receipts.ts`). The backfill activity
|
|
25
|
+
* reaches the store directly, the way the fly lexicon's release component
|
|
26
|
+
* reaches its own. The same table holds the receipts of a sql project's
|
|
27
|
+
* `effect()` steps (`../../receipts.ts`), under their own addresses.
|
|
30
28
|
*
|
|
31
29
|
* Write discipline: the backfill writes a partition's receipt after the
|
|
32
30
|
* partition's copy succeeded, last, and nothing else writes one.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipts.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/receipts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"receipts.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/receipts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAInE,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvD,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAClD,4CAA4C;AAC5C,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D,oHAAoH;AACpH,wBAAgB,aAAa,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAEvF;AAMD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,oEAAoE;AACpE,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAErD;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,kBAAkB,EAC5B,QAAQ,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EAC1C,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAO,GACnG,sBAAsB,CA8DxB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A rebuild across the shards of a cluster (#3663).
|
|
3
|
+
*
|
|
4
|
+
* On a `cluster:<name>` topology the rebuild's DDL runs `ON CLUSTER`, so
|
|
5
|
+
* every server gets the new table, the dual-write view and the swap. The
|
|
6
|
+
* rows do not move that way: each shard holds its own, and a copy run on
|
|
7
|
+
* the profile's server alone copies that server's shard and no other. So
|
|
8
|
+
* with more than one shard, the backfill and the verification work shard by
|
|
9
|
+
* shard, all through the profile's server:
|
|
10
|
+
*
|
|
11
|
+
* - a shard's rows are read with `cluster('<name>', db, t)` and
|
|
12
|
+
* `_shard_num = <n>`, one replica per shard, as the cluster's own
|
|
13
|
+
* configuration reaches it;
|
|
14
|
+
* - they are written back to the same shard with
|
|
15
|
+
* `INSERT INTO FUNCTION cluster('<name>', db, t__chant_new, <slot>)`, a
|
|
16
|
+
* constant sharding key that lands on that shard, inserted in the
|
|
17
|
+
* foreground so the statement returns once the shard has the rows;
|
|
18
|
+
* - a shard's half-copied rows are deleted with an `ALTER ... ON CLUSTER`
|
|
19
|
+
* whose condition holds on that shard's servers only
|
|
20
|
+
* (`getMacro('shard')`, the macro the cluster's Keeper paths already use).
|
|
21
|
+
*
|
|
22
|
+
* Each (shard, partition) is one copy with its own receipt, so a rerun after
|
|
23
|
+
* a failure on one shard skips what every shard already copied.
|
|
24
|
+
*
|
|
25
|
+
* With one shard nothing changes: the replicas of a shard replicate what is
|
|
26
|
+
* written on any of them, which is what the rebuild has always relied on.
|
|
27
|
+
*/
|
|
28
|
+
import type { ClickHouseTarget } from "../live/bind.js";
|
|
29
|
+
export interface Shard {
|
|
30
|
+
/** `_shard_num` / `system.clusters.shard_num`, from 1. */
|
|
31
|
+
num: number;
|
|
32
|
+
/** The shard's `{shard}` macro, the same on each of its replicas. */
|
|
33
|
+
macro: string;
|
|
34
|
+
/** The sharding key that lands on this shard: the sum of the weights of the shards before it. */
|
|
35
|
+
slot: number;
|
|
36
|
+
}
|
|
37
|
+
export interface Sharding {
|
|
38
|
+
cluster: string;
|
|
39
|
+
shards: Shard[];
|
|
40
|
+
}
|
|
41
|
+
/** Settings for a copy into one shard: in the foreground, and read from the cluster rather than pushed down to each shard. */
|
|
42
|
+
export declare const SHARD_INSERT_SETTINGS: Record<string, string>;
|
|
43
|
+
/** Settings for a delete on one shard: its condition is the server's own macro, the same on every replica of the shard. */
|
|
44
|
+
export declare const SHARD_DELETE_SETTINGS: Record<string, string>;
|
|
45
|
+
/**
|
|
46
|
+
* The shards of the target's cluster, when its topology is `cluster:<name>`
|
|
47
|
+
* and the cluster has more than one. Undefined otherwise: the rebuild works
|
|
48
|
+
* on the profile's server as it always has.
|
|
49
|
+
*/
|
|
50
|
+
export declare function clusterSharding(target: ClickHouseTarget): Promise<Sharding | undefined>;
|
|
51
|
+
/** One shard's rows of `database.table`, as a table expression; filter with {@link onShard}. */
|
|
52
|
+
export declare const shardTable: (sharding: Sharding, database: string, table: string) => string;
|
|
53
|
+
/** The condition that keeps one shard's rows of a {@link shardTable}. */
|
|
54
|
+
export declare const onShard: (shard: Shard) => string;
|
|
55
|
+
/** Where a copy into one shard of `database.table` writes. */
|
|
56
|
+
export declare const intoShard: (sharding: Sharding, shard: Shard, database: string, table: string) => string;
|
|
57
|
+
/** The condition, in an `ALTER ... ON CLUSTER` mutation, that holds on that shard's servers only. */
|
|
58
|
+
export declare const onShardServers: (shard: Shard) => string;
|
|
59
|
+
//# sourceMappingURL=shards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shards.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/shards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIrD,MAAM,WAAW,KAAK;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,iGAAiG;IACjG,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED,8HAA8H;AAC9H,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAmF,CAAC;AAE7I,2HAA2H;AAC3H,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAkE,CAAC;AAE5H;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAgC7F;AAED,gGAAgG;AAChG,eAAO,MAAM,UAAU,GAAI,UAAU,QAAQ,EAAE,UAAU,MAAM,EAAE,OAAO,MAAM,KAAG,MAAwF,CAAC;AAE1K,yEAAyE;AACzE,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,KAAG,MAAqC,CAAC;AAE7E,8DAA8D;AAC9D,eAAO,MAAM,SAAS,GAAI,UAAU,QAAQ,EAAE,OAAO,KAAK,EAAE,UAAU,MAAM,EAAE,OAAO,MAAM,KAAG,MACU,CAAC;AAEzG,qGAAqG;AACrG,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,KAAG,MAAyD,CAAC"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { OwnershipMarker } from "@intentius/chant/ownership";
|
|
10
10
|
import type { ClickHouseTarget } from "../live/bind.js";
|
|
11
11
|
import { type DeclaredObject } from "../apply/statements.js";
|
|
12
|
+
import type { Sharding } from "./shards.js";
|
|
12
13
|
import { type DualWrite, type RebuildObservation } from "./observe.js";
|
|
13
14
|
/** What every step is given. */
|
|
14
15
|
export interface RebuildRun {
|
|
@@ -28,6 +29,8 @@ export interface RebuildRun {
|
|
|
28
29
|
signal?: AbortSignal;
|
|
29
30
|
/** The run's id, recorded on the receipts it writes. */
|
|
30
31
|
runId?: string;
|
|
32
|
+
/** On a cluster of more than one shard, its shards: the backfill and the verification work shard by shard (`./shards.ts`). */
|
|
33
|
+
sharding?: Sharding;
|
|
31
34
|
}
|
|
32
35
|
/** The server's clock, in milliseconds: the cut-over and the retention are the server's times, not this machine's. */
|
|
33
36
|
export declare function serverNow(target: ClickHouseTarget): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/steps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAyE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKjI,OAAO,EAML,KAAK,SAAS,EACd,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAA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F,wBAAsB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAavE;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,2GAA2G;AAC3G,wBAAsB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAUvE;AAID,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoBtI"}
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
* later than the cut-over delay, with a time before the cut-over) stop the
|
|
25
25
|
* swap too, rather than stay behind in the old table.
|
|
26
26
|
*
|
|
27
|
+
* On a cluster of more than one shard (#3663) every shard is read, through
|
|
28
|
+
* the profile's server, and each partition is compared per shard
|
|
29
|
+
* (`shard<n>/<partition>`), so a shard the copy missed is a difference.
|
|
30
|
+
*
|
|
27
31
|
* Any difference fails the run, naming the partitions; the run's onFailure
|
|
28
32
|
* then drops the new table. On a match the result carries the digest the
|
|
29
33
|
* swap gate binds: the rebuild's plan and the counts and checksums of the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/verify.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/clickhouse/rebuild/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;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|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/codegen/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/codegen/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwBH,wBAAgB,aAAa,IAAI,MAAM,CAKtC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -97,6 +97,13 @@ export declare const sqlProfileSchema: z.ZodObject<{
|
|
|
97
97
|
schemas: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
98
98
|
/** Postgres: the schema an unqualified declaration is created in. `public` when omitted. */
|
|
99
99
|
defaultSchema: z.ZodOptional<z.ZodString>;
|
|
100
|
+
/**
|
|
101
|
+
* Postgres: the schema `effect()` receipts are kept in, as
|
|
102
|
+
* `<schema>.__chant_receipts`. When omitted they are in
|
|
103
|
+
* `chant_receipts.receipts`, a schema chant creates; name an existing schema
|
|
104
|
+
* on a server where the role cannot `CREATE SCHEMA`.
|
|
105
|
+
*/
|
|
106
|
+
receiptsSchema: z.ZodOptional<z.ZodString>;
|
|
100
107
|
/**
|
|
101
108
|
* The managed service this environment's Postgres runs on, when it differs
|
|
102
109
|
* from `sql.provider`. Import reads the provider's own roles, schemas and
|
|
@@ -214,6 +221,13 @@ export declare const sqlConfigSchema: z.ZodObject<{
|
|
|
214
221
|
schemas: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
222
|
/** Postgres: the schema an unqualified declaration is created in. `public` when omitted. */
|
|
216
223
|
defaultSchema: z.ZodOptional<z.ZodString>;
|
|
224
|
+
/**
|
|
225
|
+
* Postgres: the schema `effect()` receipts are kept in, as
|
|
226
|
+
* `<schema>.__chant_receipts`. When omitted they are in
|
|
227
|
+
* `chant_receipts.receipts`, a schema chant creates; name an existing schema
|
|
228
|
+
* on a server where the role cannot `CREATE SCHEMA`.
|
|
229
|
+
*/
|
|
230
|
+
receiptsSchema: z.ZodOptional<z.ZodString>;
|
|
217
231
|
/**
|
|
218
232
|
* The managed service this environment's Postgres runs on, when it differs
|
|
219
233
|
* from `sql.provider`. Import reads the provider's own roles, schemas and
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAkC3D,eAAO,MAAM,gBAAgB;IAC3B;;;;;OAKG;;IAEH,2EAA2E;;;;IAE3E,uDAAuD;;;;IAEvD;;;;OAIG;;IAEH,qFAAqF;;IAErF;;;;;;;;;OASG;;;;;;;;;;;;;;IAEH;;;;;OAKG;;IAEH,4FAA4F;;IAE5F;;;;OAIG;;;;;;;;;IAEH;;;;;OAKG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;kBAEH,CAAC;AAcH,eAAO,MAAM,eAAe;IAC1B,iEAAiE;;;;;;;;IAEjE;;;;OAIG;;;;;;;;;IAEH;;;;OAIG;;IAMH,wCAAwC;;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAkC3D,eAAO,MAAM,gBAAgB;IAC3B;;;;;OAKG;;IAEH,2EAA2E;;;;IAE3E,uDAAuD;;;;IAEvD;;;;OAIG;;IAEH,qFAAqF;;IAErF;;;;;;;;;OASG;;;;;;;;;;;;;;IAEH;;;;;OAKG;;IAEH,4FAA4F;;IAE5F;;;;;OAKG;;IAEH;;;;OAIG;;;;;;;;;IAEH;;;;;OAKG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;kBAEH,CAAC;AAcH,eAAO,MAAM,eAAe;IAC1B,iEAAiE;;;;;;;;IAEjE;;;;OAIG;;;;;;;;;IAEH;;;;OAIG;;IAMH,wCAAwC;;QAvGxC;;;;;WAKG;;QAEH,2EAA2E;;;;QAE3E,uDAAuD;;;;QAEvD;;;;WAIG;;QAEH,qFAAqF;;QAErF;;;;;;;;;WASG;;;;;;;;;;;;;;QAEH;;;;;WAKG;;QAEH,4FAA4F;;QAE5F;;;;;WAKG;;QAEH;;;;WAIG;;;;;;;;;QAEH;;;;;WAKG;;QAEH;;;WAGG;;QAEH;;;;WAIG;;;kBAqCH,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,OAAO,QAAQ,yBAAyB,CAAC;IACvC,UAAU,WAAW;QACnB,GAAG,CAAC,EAAE,SAAS,CAAC;KACjB;CACF;AAED,4EAA4E;AAC5E,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
package/dist/core/receipts.d.ts
CHANGED
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
*
|
|
11
11
|
* A dialect's store implements this interface over its own client and keeps
|
|
12
12
|
* the receipts in a table whose comment carries the ownership trailer with
|
|
13
|
-
* the `receipts` key (`./ownership.ts`), so schema reads leave it out.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* the `receipts` key (`./ownership.ts`), so schema reads leave it out. A
|
|
14
|
+
* migration's store is reached by its backfill directly. The store `effect()`
|
|
15
|
+
* steps use (`../receipts.ts`) is registered as the `receiptRead` /
|
|
16
|
+
* `receiptWrite` activities only as a fallback, so it never takes over
|
|
17
|
+
* another configured lexicon's receipt row.
|
|
16
18
|
*/
|
|
17
19
|
import type { ReceiptStore } from "@intentius/chant/op/receipt-store";
|
|
18
20
|
/** The receipt's address: `<stack>/<env>/<effect>`, the same fields an ownership marker carries. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipts.d.ts","sourceRoot":"","sources":["../../src/core/receipts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"receipts.d.ts","sourceRoot":"","sources":["../../src/core/receipts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,oGAAoG;AACpG,wBAAgB,cAAc,CAAC,QAAQ,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjG;AAED,4CAA4C;AAC5C,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,2GAA2G;IAC3G,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export { sqlSerializer } from "./serializer.js";
|
|
|
3
3
|
export { SQL_DIALECTS, type SqlDialect } from "./dialects.js";
|
|
4
4
|
export { sqlConfigSchema, type SqlConfig } from "./config.js";
|
|
5
5
|
export { database, table, view, literal } from "./clickhouse/entities.js";
|
|
6
|
-
export { schema, index, sequence, type, domain, extension } from "./postgres/entities.js";
|
|
6
|
+
export { schema, index, sequence, type, domain, extension, func, procedure, trigger } from "./postgres/entities.js";
|
|
7
7
|
export { diffStatements, renderStatements, type DiffStatementsOptions, type ManualStep, type MigrationStep, type OpStep, type SchemaStatements, type StatementChange, type StatementStep, type StepObject, } from "./migration-statements.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAM3D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMvE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAM3D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMvE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAIjH,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,wBAAwB,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
5
|
-
"meta.json": "
|
|
4
|
+
"manifest.json": "fad62f84ad66160e6ae3e7994e553d15cfa0e60b4f67dca5f1cadbe87bd0b67f",
|
|
5
|
+
"meta.json": "8c867e131811afdd43cab665e2d77e718ba76c26b6a9a39c3679bcba26a3a356",
|
|
6
6
|
"types/index.d.ts": "0286ebb367773e84c76818b0f69cb14cff8328fd2f8c65ed87563c8d5815458c",
|
|
7
|
-
"rules/postgres-templates.ts": "
|
|
7
|
+
"rules/postgres-templates.ts": "462ef4b38c445e5ed3752cab6c1d82ac424ed3d38cf0148747d24756d533c2b8",
|
|
8
8
|
"rules/sqlch001.ts": "5b017574aecb4fdce084c44d02f4012696a1f63d16c8f9b9863d59499a64ca64",
|
|
9
9
|
"rules/sqlch002.ts": "466b9db60241efa59f456bcbb69dedc7f93b29730c53c404ab04816af81fedfe",
|
|
10
10
|
"rules/sqlch003.ts": "16ee8bf9369d97cf72b021d32636e5cc23bd168a51981eef826228c24fa8a8e9",
|
|
11
|
-
"rules/sqlpg001.ts": "
|
|
11
|
+
"rules/sqlpg001.ts": "401de6f9a6fe4aa5e83faa60b696b14aed2ae53425b63c4a20ca17155ab1f07a",
|
|
12
12
|
"rules/sqlpg002.ts": "547e10e4da7a78b149b632eba21d876cb710b77fa654c7eed8ce86e27e37e81b",
|
|
13
13
|
"rules/sqlpg003.ts": "6f4903f9fdd3eb87bd4db3ad7e8fa0320db20f719ead7685a03cf7da677a7183",
|
|
14
14
|
"rules/sqlpg004.ts": "68e4eaaa455f155d6dfe779eb01d7f134d856ab5db7cf45e2eb110ed7147b580",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"rules/sqlpg117.ts": "3d5c2d57ccdee3cf91c3ba3cb6363750787a850df8ebd75e9cc3f33113303827",
|
|
58
58
|
"rules/sqlpg118.ts": "e2a40a88a9374c4d99d02118ca4c60877ba0c6eb1ce603a93b24f5fd23d81dde"
|
|
59
59
|
},
|
|
60
|
-
"composite": "
|
|
60
|
+
"composite": "b4a3c000ff29094443a238d41bbe7adf11c27a3605b96b2b1f6818cba7878062"
|
|
61
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlpg001.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/sqlpg001.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA+B,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlpg001.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/sqlpg001.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA+B,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAsBxF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,EAAE,QAuDtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-template.d.ts","sourceRoot":"","sources":["../../src/lsp/postgres-template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAsB,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAoD,KAAK,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAChI,OAAO,EAAY,KAAK,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE/E,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;AAEvD,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ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ta.json
CHANGED
|
@@ -63,5 +63,20 @@
|
|
|
63
63
|
"resourceType": "Postgres::Extension",
|
|
64
64
|
"kind": "resource",
|
|
65
65
|
"lexicon": "sql"
|
|
66
|
+
},
|
|
67
|
+
"PostgresFunction": {
|
|
68
|
+
"resourceType": "Postgres::Function",
|
|
69
|
+
"kind": "resource",
|
|
70
|
+
"lexicon": "sql"
|
|
71
|
+
},
|
|
72
|
+
"PostgresProcedure": {
|
|
73
|
+
"resourceType": "Postgres::Procedure",
|
|
74
|
+
"kind": "resource",
|
|
75
|
+
"lexicon": "sql"
|
|
76
|
+
},
|
|
77
|
+
"PostgresTrigger": {
|
|
78
|
+
"resourceType": "Postgres::Trigger",
|
|
79
|
+
"kind": "resource",
|
|
80
|
+
"lexicon": "sql"
|
|
66
81
|
}
|
|
67
82
|
}
|
package/dist/okf/index.md
CHANGED
|
@@ -9,11 +9,14 @@ okf_version: '0.2'
|
|
|
9
9
|
* [PostgresDomain](/types/PostgresDomain.md) - Postgres::Domain
|
|
10
10
|
* [PostgresEnum](/types/PostgresEnum.md) - Postgres::Enum
|
|
11
11
|
* [PostgresExtension](/types/PostgresExtension.md) - Postgres::Extension
|
|
12
|
+
* [PostgresFunction](/types/PostgresFunction.md) - Postgres::Function
|
|
12
13
|
* [PostgresIndex](/types/PostgresIndex.md) - Postgres::Index
|
|
13
14
|
* [PostgresMaterializedView](/types/PostgresMaterializedView.md) - Postgres::MaterializedView
|
|
15
|
+
* [PostgresProcedure](/types/PostgresProcedure.md) - Postgres::Procedure
|
|
14
16
|
* [PostgresSchema](/types/PostgresSchema.md) - Postgres::Schema
|
|
15
17
|
* [PostgresSequence](/types/PostgresSequence.md) - Postgres::Sequence
|
|
16
18
|
* [PostgresTable](/types/PostgresTable.md) - Postgres::Table
|
|
19
|
+
* [PostgresTrigger](/types/PostgresTrigger.md) - Postgres::Trigger
|
|
17
20
|
* [PostgresView](/types/PostgresView.md) - Postgres::View
|
|
18
21
|
* [Table](/types/Table.md) - ClickHouse::Table
|
|
19
22
|
* [View](/types/View.md) - ClickHouse::View
|