-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adopt Golang version ClickHouse data schema management #95
Conversation
eecf16a
to
4900074
Compare
/theia-test-e2e |
4900074
to
ca386e7
Compare
ad9994c
to
79d8d49
Compare
ca766e6
to
f38cd5a
Compare
/theia-test-e2e |
20d716a
to
afadc34
Compare
/theia-test-e2e |
1 similar comment
/theia-test-e2e |
0244cfd
to
17f0c1b
Compare
Codecov Report
@@ Coverage Diff @@
## main #95 +/- ##
==========================================
+ Coverage 30.65% 36.12% +5.47%
==========================================
Files 11 12 +1
Lines 1442 1683 +241
==========================================
+ Hits 442 608 +166
- Misses 978 1034 +56
- Partials 22 41 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As one of the reason we bump ClickHouse to v22.6 is that it supports both |
build/charts/theia/provisioning/datasources/migrators/000002_0-2-0.down.sql
Show resolved
Hide resolved
SETTINGS merge_with_ttl_timeout = {{ $ttlTimeout }}; | ||
|
||
--Move data from old table and drop old tables | ||
INSERT INTO flows_local SELECT * FROM flows; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, other modules also need to use flows_local instead of flows? Not sure if we need a way to keep them synced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases, the answer is no, as flows
will be a distributed table have references of flows_local
on each replica. Most modules will be able to use flows
as the interface to read/write data. This change is introduced when we introduce the non-cluster mode, and we have already update the code in other modules that are influenced by this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also not new code, it's the migration code from 0.1 to 0.2. It shows up in this diff because it has been moved into a different place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: Yanjun Zhou <zhouya@vmware.com>
4af7234
to
1c7b19e
Compare
We introduce the ClickHouse data schema management code implemented
in shell script in v0.2.0. In terms of the future maintenance, this PR
re-implements this function in Golang with the library golang-migrate.
Signed-off-by: Yanjun Zhou zhouya@vmware.com