Skip to content

Commit

Permalink
fix: settings in the creation script; fix CH cluster check
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Feb 6, 2024
1 parent a8a6209 commit 4d8f0f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node-clickhouse-cluster.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
CLICKHOUSE_TSDB: qryn
INTEGRATION_E2E: 1
CLOKI_EXT_URL: 127.0.0.1:3100
run: CLUSTER_NAME=test_cluster_two_shards node qryn.mjs >/dev/stdout & npm run test --forceExit
run: CLUSTER_NAME=test_cluster_two_shards node qryn.mjs >/dev/stdout & sleep 10 && npm run test --forceExit
8 changes: 4 additions & 4 deletions lib/db/maintain/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ module.exports.profiles = [
values_agg Array(Tuple(String, Int64, Int32)) CODEC(ZSTD(1))
) Engine {{MergeTree}}()
ORDER BY (type_id, service_name, timestamp_ns)
PARTITION BY toDate(FROM_UNIXTIME(intDiv(timestamp_ns, 1000000000)))`,
PARTITION BY toDate(FROM_UNIXTIME(intDiv(timestamp_ns, 1000000000))) {{{CREATE_SETTINGS}}}`,

`CREATE MATERIALIZED VIEW IF NOT EXISTS profiles_mv {{{OnCluster}}} TO profiles AS
SELECT
Expand Down Expand Up @@ -335,7 +335,7 @@ module.exports.profiles = [
tags Array(Tuple(String, String)) CODEC(ZSTD(1)),
) Engine {{ReplacingMergeTree}}()
ORDER BY (date, type_id, fingerprint)
PARTITION BY date`,
PARTITION BY date {{{CREATE_SETTINGS}}}`,

`CREATE MATERIALIZED VIEW IF NOT EXISTS profiles_series_mv {{{OnCluster}}} TO profiles_series AS
SELECT
Expand All @@ -362,7 +362,7 @@ module.exports.profiles = [
fingerprint UInt64 CODEC(DoubleDelta, ZSTD(1)),
) Engine {{ReplacingMergeTree}}()
ORDER BY (date, key, val, type_id, fingerprint)
PARTITION BY date`,
PARTITION BY date {{{CREATE_SETTINGS}}}`,

`CREATE MATERIALIZED VIEW IF NOT EXISTS profiles_series_gin_mv {{{OnCluster}}} TO profiles_series_gin AS
SELECT
Expand All @@ -382,7 +382,7 @@ module.exports.profiles = [
val_id UInt64
) Engine {{ReplacingMergeTree}}()
ORDER BY (date, key, val_id)
PARTITION BY date`,
PARTITION BY date {{{CREATE_SETTINGS}}}`,

`CREATE MATERIALIZED VIEW IF NOT EXISTS profiles_series_keys_mv {{{OnCluster}}} TO profiles_series_keys AS
SELECT
Expand Down

0 comments on commit 4d8f0f5

Please sign in to comment.