-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
Copy pathdatabases
56 lines (51 loc) · 1.12 KB
/
databases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Setup:
# Create a database with some tables, types, and schemas inside it. Then, generate
# span configurations implied by the database.
exec-sql
CREATE DATABASE db;
CREATE TABLE db.t1();
CREATE TYPE typ AS ENUM();
CREATE SCHEMA sc;
CREATE TABLE db.t2();
ALTER DATABASE db CONFIGURE ZONE USING num_replicas=7;
ALTER TABLE db.t1 CONFIGURE ZONE USING num_voters=5;
----
query-sql
SELECT id FROM system.namespace WHERE name='db'
----
52
query-sql
SELECT id FROM system.namespace WHERE name='t1'
----
53
query-sql
SELECT id FROM system.namespace WHERE name='t2'
----
57
# We only expect there to be span config entries for tables t1 and t2.
generate-span-configs-for-id id=52
----
Span: /Table/5{3-4}
rangeminbytes: 134217728
rangemaxbytes: 536870912
gcpolicy:
ttlseconds: 90000
globalreads: false
numreplicas: 7
numvoters: 5
constraints: []
voterconstraints: []
leasepreferences: []
-----------------------
Span: /Table/5{7-8}
rangeminbytes: 134217728
rangemaxbytes: 536870912
gcpolicy:
ttlseconds: 90000
globalreads: false
numreplicas: 7
numvoters: 7
constraints: []
voterconstraints: []
leasepreferences: []
-----------------------