system-cluster.slt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. mode cockroach
  10. # Start from a pristine server
  11. reset-server
  12. statement ok
  13. SET CLUSTER TO mz_catalog_server
  14. query T multiline
  15. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW DATABASES
  16. ----
  17. Explained Query (fast path):
  18. ReadIndex on=mz_internal.mz_show_databases mz_show_databases_ind=[*** full scan ***]
  19. Used Indexes:
  20. - mz_internal.mz_show_databases_ind (*** full scan ***)
  21. Target cluster: mz_catalog_server
  22. EOF
  23. query T multiline
  24. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW SCHEMAS
  25. ----
  26. Explained Query (fast path):
  27. Project (#1{name}, #2{comment})
  28. Filter ((#0{database_id}) IS NULL OR (#0{database_id} = "u1"))
  29. ReadIndex on=mz_internal.mz_show_schemas mz_show_schemas_ind=[*** full scan ***]
  30. Used Indexes:
  31. - mz_internal.mz_show_schemas_ind (*** full scan ***)
  32. Target cluster: mz_catalog_server
  33. EOF
  34. query T multiline
  35. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW CONNECTIONS
  36. ----
  37. Explained Query (fast path):
  38. Project (#1{name}..=#3{comment})
  39. ReadIndex on=mz_internal.mz_show_connections mz_show_connections_ind=[lookup value=("u3")]
  40. Used Indexes:
  41. - mz_internal.mz_show_connections_ind (lookup)
  42. Target cluster: mz_catalog_server
  43. EOF
  44. query T multiline
  45. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW TABLES
  46. ----
  47. Explained Query (fast path):
  48. Project (#1{name}, #2{comment})
  49. ReadIndex on=mz_internal.mz_show_tables mz_show_tables_ind=[lookup value=("u3")]
  50. Used Indexes:
  51. - mz_internal.mz_show_tables_ind (lookup)
  52. Target cluster: mz_catalog_server
  53. EOF
  54. query T multiline
  55. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW SOURCES
  56. ----
  57. Explained Query (fast path):
  58. Project (#2{name}..=#4{cluster}, #6{comment})
  59. ReadIndex on=mz_internal.mz_show_sources mz_show_sources_ind=[lookup value=("u3")]
  60. Used Indexes:
  61. - mz_internal.mz_show_sources_ind (lookup)
  62. Target cluster: mz_catalog_server
  63. EOF
  64. query T multiline
  65. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW VIEWS
  66. ----
  67. Explained Query (fast path):
  68. Project (#1{name}, #2{comment})
  69. ReadIndex on=mz_internal.mz_show_views mz_show_views_ind=[lookup value=("u3")]
  70. Used Indexes:
  71. - mz_internal.mz_show_views_ind (lookup)
  72. Target cluster: mz_catalog_server
  73. EOF
  74. query T multiline
  75. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW MATERIALIZED VIEWS
  76. ----
  77. Explained Query (fast path):
  78. Project (#2{name}, #3{cluster}, #5{comment})
  79. ReadIndex on=mz_internal.mz_show_materialized_views mz_show_materialized_views_ind=[lookup value=("u3")]
  80. Used Indexes:
  81. - mz_internal.mz_show_materialized_views_ind (lookup)
  82. Target cluster: mz_catalog_server
  83. EOF
  84. query T multiline
  85. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW MATERIALIZED VIEWS IN CLUSTER quickstart
  86. ----
  87. Explained Query (fast path):
  88. Project (#2{name}, #3{cluster}, #5{comment})
  89. Filter (#4{cluster_id} = "u1")
  90. ReadIndex on=mz_internal.mz_show_materialized_views mz_show_materialized_views_ind=[lookup value=("u3")]
  91. Used Indexes:
  92. - mz_internal.mz_show_materialized_views_ind (lookup)
  93. Target cluster: mz_catalog_server
  94. EOF
  95. query T multiline
  96. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW INDEXES
  97. ----
  98. Explained Query (fast path):
  99. Project (#2{name}..=#5{key}, #8{comment})
  100. Filter NOT(like["s%"](#6{on_id}))
  101. ReadIndex on=mz_internal.mz_show_indexes mz_show_indexes_ind=[lookup value=("u3")]
  102. Used Indexes:
  103. - mz_internal.mz_show_indexes_ind (lookup)
  104. Target cluster: mz_catalog_server
  105. EOF
  106. query T multiline
  107. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW INDEXES IN CLUSTER quickstart
  108. ----
  109. Explained Query (fast path):
  110. Project (#2{name}..=#5{key}, #8{comment})
  111. Filter (#7{cluster_id} = "u1")
  112. ReadIndex on=mz_internal.mz_show_indexes mz_show_indexes_ind=[*** full scan ***]
  113. Used Indexes:
  114. - mz_internal.mz_show_indexes_ind (*** full scan ***)
  115. Target cluster: mz_catalog_server
  116. EOF
  117. query T multiline
  118. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW SINKS
  119. ----
  120. Explained Query (fast path):
  121. Project (#2{name}..=#4{cluster}, #6{comment})
  122. ReadIndex on=mz_internal.mz_show_sinks mz_show_sinks_ind=[lookup value=("u3")]
  123. Used Indexes:
  124. - mz_internal.mz_show_sinks_ind (lookup)
  125. Target cluster: mz_catalog_server
  126. EOF
  127. query T multiline
  128. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW TYPES
  129. ----
  130. Explained Query (fast path):
  131. Project (#1{name}, #2{comment})
  132. ReadIndex on=mz_internal.mz_show_types mz_show_types_ind=[lookup value=("u3")]
  133. Used Indexes:
  134. - mz_internal.mz_show_types_ind (lookup)
  135. Target cluster: mz_catalog_server
  136. EOF
  137. query T multiline
  138. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW OBJECTS
  139. ----
  140. Explained Query (fast path):
  141. Project (#1{name}..=#3{comment})
  142. ReadIndex on=mz_internal.mz_show_all_objects mz_show_all_objects_ind=[lookup value=("u3")]
  143. Used Indexes:
  144. - mz_internal.mz_show_all_objects_ind (lookup)
  145. Target cluster: mz_catalog_server
  146. EOF
  147. statement ok
  148. CREATE TABLE t (a INT)
  149. query T multiline
  150. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW COLUMNS IN t
  151. ----
  152. Explained Query (fast path):
  153. Project (#1{name}..=#3{type}, #5{comment})
  154. ReadIndex on=mz_internal.mz_show_columns mz_show_columns_ind=[lookup value=("u1")]
  155. Used Indexes:
  156. - mz_internal.mz_show_columns_ind (lookup)
  157. Target cluster: mz_catalog_server
  158. EOF
  159. # TODO[btv] - We should probably someday
  160. # optimize `SELECT name FROM (SHOW CLUSTERS)`
  161. # to do the same thing as `SELECT name FROM mz_clusters`;
  162. # i.e., just read out of the index we have on the latter table.
  163. # However, today we cannot do that. It's probably fine in practice
  164. # as there won't be more than a few dozen clusters/replicas in any
  165. # real world deployment, so spinning up a dataflow with joins
  166. # etc. is only mildly bad.
  167. #
  168. # See discussion here: https://materializeinc.slack.com/archives/C02PPB50ZHS/p1691531471306959
  169. #
  170. # query T multiline
  171. # EXPLAIN SELECT name FROM (SHOW CLUSTERS)
  172. # ----
  173. # Explained Query (fast path):
  174. # Project (#0)
  175. # ReadIndex mz_internal.mz_show_clusters_ind
  176. #
  177. # Used Indexes:
  178. # - mz_internal.mz_show_clusters_ind
  179. #
  180. # EOF
  181. query T multiline
  182. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW CLUSTER REPLICAS
  183. ----
  184. Explained Query (fast path):
  185. Project (#0{cluster}, #1{replica}, #3{size}..=#5{comment})
  186. ReadIndex on=mz_internal.mz_show_cluster_replicas mz_show_cluster_replicas_ind=[*** full scan ***]
  187. Used Indexes:
  188. - mz_internal.mz_show_cluster_replicas_ind (*** full scan ***)
  189. Target cluster: mz_catalog_server
  190. EOF
  191. query T multiline
  192. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW CLUSTER REPLICAS WHERE cluster IN ('compute_qck', 'ingest_qck');
  193. ----
  194. Explained Query (fast path):
  195. Project (#0{cluster}, #1{replica}, #3{size}..=#5{comment})
  196. ReadIndex on=mz_internal.mz_show_cluster_replicas mz_show_cluster_replicas_ind=[lookup values=[("ingest_qck"); ("compute_qck")]]
  197. Used Indexes:
  198. - mz_internal.mz_show_cluster_replicas_ind (lookup)
  199. Target cluster: mz_catalog_server
  200. EOF
  201. query T multiline
  202. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SHOW SECRETS
  203. ----
  204. Explained Query (fast path):
  205. Project (#1{name}, #2{comment})
  206. ReadIndex on=mz_internal.mz_show_secrets mz_show_secrets_ind=[lookup value=("u3")]
  207. Used Indexes:
  208. - mz_internal.mz_show_secrets_ind (lookup)
  209. Target cluster: mz_catalog_server
  210. EOF
  211. query T multiline
  212. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT id FROM mz_catalog.mz_indexes
  213. ----
  214. Explained Query (fast path):
  215. Project (#0{id})
  216. ReadIndex on=mz_catalog.mz_indexes mz_indexes_ind=[*** full scan ***]
  217. Used Indexes:
  218. - mz_catalog.mz_indexes_ind (*** full scan ***)
  219. Target cluster: mz_catalog_server
  220. EOF
  221. query T multiline
  222. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT id FROM mz_catalog.mz_roles
  223. ----
  224. Explained Query (fast path):
  225. Project (#0{id})
  226. ReadIndex on=mz_catalog.mz_roles mz_roles_ind=[*** full scan ***]
  227. Used Indexes:
  228. - mz_catalog.mz_roles_ind (*** full scan ***)
  229. Target cluster: mz_catalog_server
  230. EOF
  231. query T multiline
  232. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT id FROM mz_catalog.mz_sources
  233. ----
  234. Explained Query (fast path):
  235. Project (#0{id})
  236. ReadIndex on=mz_catalog.mz_sources mz_sources_ind=[*** full scan ***]
  237. Used Indexes:
  238. - mz_catalog.mz_sources_ind (*** full scan ***)
  239. Target cluster: mz_catalog_server
  240. EOF
  241. query T multiline
  242. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT id FROM mz_catalog.mz_sinks
  243. ----
  244. Explained Query (fast path):
  245. Project (#0{id})
  246. ReadIndex on=mz_catalog.mz_sinks mz_sinks_ind=[*** full scan ***]
  247. Used Indexes:
  248. - mz_catalog.mz_sinks_ind (*** full scan ***)
  249. Target cluster: mz_catalog_server
  250. EOF
  251. query T multiline
  252. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT id FROM mz_catalog.mz_materialized_views
  253. ----
  254. Explained Query (fast path):
  255. Project (#0{id})
  256. ReadIndex on=mz_catalog.mz_materialized_views mz_materialized_views_ind=[*** full scan ***]
  257. Used Indexes:
  258. - mz_catalog.mz_materialized_views_ind (*** full scan ***)
  259. Target cluster: mz_catalog_server
  260. EOF
  261. query T multiline
  262. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT object_id FROM mz_internal.mz_object_dependencies
  263. ----
  264. Explained Query (fast path):
  265. Project (#0{object_id})
  266. ReadIndex on=mz_internal.mz_object_dependencies mz_object_dependencies_ind=[*** full scan ***]
  267. Used Indexes:
  268. - mz_internal.mz_object_dependencies_ind (*** full scan ***)
  269. Target cluster: mz_catalog_server
  270. EOF
  271. query T multiline
  272. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT dependency_id FROM mz_internal.mz_compute_dependencies
  273. ----
  274. Explained Query (fast path):
  275. Project (#0{dependency_id})
  276. ReadIndex on=mz_internal.mz_compute_dependencies mz_compute_dependencies_ind=[*** full scan ***]
  277. Used Indexes:
  278. - mz_internal.mz_compute_dependencies_ind (*** full scan ***)
  279. Target cluster: mz_catalog_server
  280. EOF
  281. query T multiline
  282. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT dropped_at FROM mz_internal.mz_cluster_replica_history
  283. ----
  284. Explained Query (fast path):
  285. Project (#0{dropped_at})
  286. ReadIndex on=mz_internal.mz_cluster_replica_history mz_cluster_replica_history_ind=[*** full scan ***]
  287. Used Indexes:
  288. - mz_internal.mz_cluster_replica_history_ind (*** full scan ***)
  289. Target cluster: mz_catalog_server
  290. EOF
  291. # Following are used in the UI
  292. query T multiline
  293. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT r.id,
  294. r.name as replica_name,
  295. r.cluster_id,
  296. r.size,
  297. c.name as cluster_name,
  298. u.memory_percent
  299. FROM mz_cluster_replicas r
  300. JOIN mz_clusters c ON c.id = r.cluster_id
  301. JOIN mz_internal.mz_cluster_replica_utilization u ON u.replica_id = r.id
  302. ORDER BY r.id;
  303. ----
  304. Explained Query:
  305. Finish order_by=[#0{id} asc nulls_last] output=[#0..=#5]
  306. Project (#0{id}..=#3{size}, #5{name}, #29)
  307. Map (((uint8_to_double(#27{memory_bytes}) / uint8_to_double(#21{memory_bytes})) * 100))
  308. Join on=(#0{id} = #15{id} = #24{replica_id} AND #2{cluster_id} = #4{id} AND #16{size} = #17{size}) type=delta
  309. ArrangeBy keys=[[#0{id}], [#2{cluster_id}]]
  310. Project (#0{id}..=#3{size})
  311. ReadIndex on=mz_cluster_replicas mz_cluster_replicas_ind=[*** full scan ***]
  312. ArrangeBy keys=[[#0{id}]]
  313. ReadIndex on=mz_clusters mz_clusters_ind=[delta join lookup]
  314. ArrangeBy keys=[[#0{id}], [#1{size}]]
  315. Project (#0{id}, #3{size})
  316. Filter (#3{size}) IS NOT NULL
  317. ReadIndex on=mz_cluster_replicas mz_cluster_replicas_ind=[*** full scan ***]
  318. ArrangeBy keys=[[#0{size}]]
  319. ReadIndex on=mz_cluster_replica_sizes mz_cluster_replica_sizes_ind=[delta join lookup]
  320. ArrangeBy keys=[[#0{replica_id}]]
  321. ReadIndex on=mz_cluster_replica_metrics mz_cluster_replica_metrics_ind=[delta join lookup]
  322. Used Indexes:
  323. - mz_catalog.mz_clusters_ind (delta join lookup)
  324. - mz_catalog.mz_cluster_replicas_ind (*** full scan ***)
  325. - mz_catalog.mz_cluster_replica_sizes_ind (delta join lookup)
  326. - mz_internal.mz_cluster_replica_metrics_ind (delta join lookup)
  327. Target cluster: mz_catalog_server
  328. EOF
  329. query T multiline
  330. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT s.id, s.oid, s.name, s.type, s.size, st.status, st.error
  331. FROM mz_sources s
  332. LEFT OUTER JOIN mz_internal.mz_source_statuses st
  333. ON st.id = s.id
  334. WHERE s.id LIKE 'u%';
  335. ----
  336. Explained Query:
  337. With
  338. cte l0 =
  339. ArrangeBy keys=[[#0{id}]]
  340. ReadIndex on=mz_sources mz_sources_ind=[differential join]
  341. cte l1 =
  342. Project (#0{id}, #1{oid}, #3{name}, #4{type}, #6{size}, #19{status}, #20{error})
  343. Filter like["u%"](#0{id})
  344. Join on=(#0{id} = #15{id}) type=differential
  345. Get l0
  346. ArrangeBy keys=[[#0{id}]]
  347. ReadIndex on=mz_source_statuses mz_source_statuses_ind=[differential join]
  348. Return
  349. Union
  350. Map (null, null)
  351. Union
  352. Negate
  353. Project (#0{id}, #1{oid}, #3{name}, #4{type}, #6{size})
  354. Filter like["u%"](#0{id})
  355. Join on=(#0{id} = #15{id}) type=differential
  356. Get l0
  357. ArrangeBy keys=[[#0{id}]]
  358. Distinct project=[#0{id}]
  359. Project (#0{id})
  360. Get l1
  361. Project (#0{id}, #1{oid}, #3{name}, #4{type}, #6{size})
  362. Filter like["u%"](#0{id})
  363. ReadIndex on=mz_sources mz_sources_ind=[*** full scan ***]
  364. Get l1
  365. Used Indexes:
  366. - mz_catalog.mz_sources_ind (*** full scan ***, differential join)
  367. - mz_internal.mz_source_statuses_ind (differential join)
  368. Target cluster: mz_catalog_server
  369. EOF
  370. query T multiline
  371. EXPLAIN OPTIMIZED PLAN WITH (humanized expressions) AS VERBOSE TEXT FOR SELECT MAX(extract(epoch from h.occurred_at) * 1000) as last_occurred, h.error, COUNT(h.occurred_at)
  372. FROM mz_internal.mz_source_status_history h
  373. WHERE source_id = 'u6'
  374. AND error IS NOT NULL
  375. AND h.occurred_at BETWEEN 0 AND 100
  376. GROUP BY h.error
  377. ORDER BY last_occurred DESC
  378. LIMIT 10;
  379. ----
  380. Explained Query:
  381. Finish order_by=[#0{max} desc nulls_first] limit=10 output=[#0..=#2]
  382. Project (#1{max}, #0{error}, #2{count})
  383. Reduce group_by=[#1{error}] aggregates=[max((extract_epoch_tstz(#0{occurred_at}) * 1000)), count(*)]
  384. Project (#0{occurred_at}, #3{error})
  385. Filter (#7 <= 100) AND (#7 >= 0) AND (#3{error}) IS NOT NULL
  386. Map (timestamp_tz_to_mz_timestamp(#0{occurred_at}))
  387. ReadIndex on=mz_internal.mz_source_status_history mz_source_status_history_ind=[lookup value=("u6")]
  388. Used Indexes:
  389. - mz_internal.mz_source_status_history_ind (lookup)
  390. Target cluster: mz_catalog_server
  391. EOF
  392. # Querying user objects should not be allowed from the catalog server cluster.
  393. statement ok
  394. CREATE CLUSTER foo REPLICAS (r1 (SIZE '1'));
  395. statement ok
  396. SET CLUSTER TO foo;
  397. statement ok
  398. CREATE TABLE bar ( key text, val bigint );
  399. statement ok
  400. SET CLUSTER TO mz_catalog_server;
  401. statement error db error: ERROR: querying the following items "materialize\.public\.bar" is not allowed from the "mz_catalog_server" cluster
  402. SELECT key FROM bar;
  403. # But inspecting those objects, e.g. checking what indexes exist, should be allowed.
  404. statement ok
  405. SHOW INDEXES on bar;
  406. statement ok
  407. SET CLUSTER TO mz_catalog_server;
  408. statement ok
  409. DROP CLUSTER foo CASCADE;
  410. # Creating views with the mz_catalog_server cluster active should be allowed though.
  411. statement ok
  412. CREATE VIEW keys AS ( SELECT key FROM bar );
  413. # But creating objects that install resources, should not be allowed.
  414. simple conn=mz_system,user=mz_system
  415. ALTER SYSTEM SET enable_rbac_checks TO false;
  416. ----
  417. COMPLETE 0
  418. statement error permission denied for CLUSTER "mz_catalog_server"
  419. CREATE MATERIALIZED VIEW live_keys AS ( SELECT key FROM bar );
  420. statement error must be owner of CLUSTER mz_catalog_server
  421. ALTER CLUSTER mz_catalog_server SET (REPLICATION FACTOR 2);
  422. statement error permission denied for CLUSTER "mz_catalog_server"
  423. CREATE INDEX i_keys ON bar (key);
  424. statement error must be owner of CLUSTER mz_system
  425. ALTER CLUSTER mz_system SET (MANAGED = false)
  426. simple conn=mz_system,user=mz_system
  427. ALTER CLUSTER mz_system SET (REPLICATION FACTOR 0)
  428. ----
  429. COMPLETE 0
  430. statement error must be owner of CLUSTER mz_system
  431. ALTER CLUSTER mz_system SET (REPLICATION FACTOR 1)
  432. simple conn=mz_system,user=mz_system
  433. ALTER CLUSTER mz_system SET (REPLICATION FACTOR 1)
  434. ----
  435. COMPLETE 0
  436. # Replicas in system clusters should system IDs.
  437. simple conn=mz_system,user=mz_system
  438. ALTER CLUSTER mz_system SET (SIZE = '2')
  439. ----
  440. COMPLETE 0
  441. query I
  442. SELECT COUNT(*) FROM mz_cluster_replicas WHERE cluster_id = (SELECT id FROM mz_clusters WHERE name = 'mz_system') AND id LIKE 's%';
  443. ----
  444. 1
  445. query I
  446. SELECT COUNT(*) FROM mz_cluster_replicas WHERE cluster_id = (SELECT id FROM mz_clusters WHERE name = 'mz_system') AND id LIKE 'u%';
  447. ----
  448. 0
  449. reset-server