forked from cadence-workflow/cadence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move visibility store to its own keyspace (cadence-workflow#217)
Issue cadence-workflow#181
- Loading branch information
Tamer Eldeeb
authored
Jun 5, 2017
1 parent
f48b5cf
commit cb971ca
Showing
11 changed files
with
113 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CREATE KEYSPACE IF NOT EXISTS cadence_visibility WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CREATE TABLE open_executions ( | ||
domain_id uuid, | ||
domain_partition int, | ||
workflow_id text, | ||
run_id uuid, | ||
start_time timestamp, | ||
workflow_type_name text, | ||
PRIMARY KEY ((domain_id, domain_partition), start_time, run_id) | ||
) WITH CLUSTERING ORDER BY (start_time DESC) | ||
AND COMPACTION = { | ||
'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy' | ||
} | ||
AND GC_GRACE_SECONDS = 172800; | ||
|
||
|
||
CREATE INDEX open_by_workflow_id ON open_executions (workflow_id); | ||
CREATE INDEX open_by_type ON open_executions (workflow_type_name); | ||
|
||
CREATE TABLE closed_executions ( | ||
domain_id uuid, | ||
domain_partition int, | ||
workflow_id text, | ||
run_id uuid, | ||
start_time timestamp, | ||
close_time timestamp, | ||
status int, -- enum WorkflowExecutionCloseStatus {COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT} | ||
workflow_type_name text, | ||
PRIMARY KEY ((domain_id, domain_partition), start_time, run_id) | ||
) WITH CLUSTERING ORDER BY (start_time DESC) | ||
AND COMPACTION = { | ||
'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy' | ||
} | ||
AND GC_GRACE_SECONDS = 172800; | ||
|
||
CREATE INDEX closed_by_workflow_id ON closed_executions (workflow_id); | ||
CREATE INDEX closed_by_close_time ON closed_executions (close_time); | ||
CREATE INDEX closed_by_type ON closed_executions (workflow_type_name); | ||
CREATE INDEX closed_by_status ON closed_executions (status); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CREATE TABLE open_executions ( | ||
domain_id uuid, | ||
domain_partition int, | ||
workflow_id text, | ||
run_id uuid, | ||
start_time timestamp, | ||
workflow_type_name text, | ||
PRIMARY KEY ((domain_id, domain_partition), start_time, run_id) | ||
) WITH CLUSTERING ORDER BY (start_time DESC) | ||
AND COMPACTION = { | ||
'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy' | ||
} | ||
AND GC_GRACE_SECONDS = 172800; | ||
|
||
|
||
CREATE INDEX open_by_workflow_id ON open_executions (workflow_id); | ||
CREATE INDEX open_by_type ON open_executions (workflow_type_name); | ||
|
||
CREATE TABLE closed_executions ( | ||
domain_id uuid, | ||
domain_partition int, | ||
workflow_id text, | ||
run_id uuid, | ||
start_time timestamp, | ||
close_time timestamp, | ||
status int, -- enum WorkflowExecutionCloseStatus {COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT} | ||
workflow_type_name text, | ||
PRIMARY KEY ((domain_id, domain_partition), start_time, run_id) | ||
) WITH CLUSTERING ORDER BY (start_time DESC) | ||
AND COMPACTION = { | ||
'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy' | ||
} | ||
AND GC_GRACE_SECONDS = 172800; | ||
|
||
CREATE INDEX closed_by_workflow_id ON closed_executions (workflow_id); | ||
CREATE INDEX closed_by_close_time ON closed_executions (close_time); | ||
CREATE INDEX closed_by_type ON closed_executions (workflow_type_name); | ||
CREATE INDEX closed_by_status ON closed_executions (status); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"CurrVersion": "0.1", | ||
"MinCompatibleVersion": "0.1", | ||
"Description": "base version of visibility schema", | ||
"SchemaUpdateCqlFiles": [ | ||
"base.cql" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters