-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(migrations): replace discover_dist with discover_dist_new #5789
Conversation
This PR has a migration; here is the generated SQL -- start migrations
-- forward migration discover : 0008_discover_fix_new_dist_table
Local op: CREATE TABLE IF NOT EXISTS discover_local (event_id UUID, project_id UInt64, type LowCardinality(String), timestamp DateTime, platform LowCardinality(String), environment LowCardinality(Nullable(String)), release LowCardinality(Nullable(String)), dist LowCardinality(Nullable(String)), transaction_name LowCardinality(String), message String, title String, user String, user_hash UInt64, user_id Nullable(String), user_name Nullable(String), user_email Nullable(String), ip_address_v4 Nullable(IPv4), ip_address_v6 Nullable(IPv6), sdk_name LowCardinality(Nullable(String)), sdk_version LowCardinality(Nullable(String)), http_method LowCardinality(Nullable(String)), http_referer Nullable(String), tags Nested(key String, value String), _tags_hash_map Array(UInt64), contexts Nested(key String, value String), span_id Nullable(UInt64), trace_id Nullable(UUID), deleted UInt8) ENGINE Merge(currentDatabase(), '^errors_local$|^transactions_local$');
Distributed op: CREATE TABLE IF NOT EXISTS discover_dist_new (event_id UUID, project_id UInt64, type LowCardinality(String), timestamp DateTime, platform LowCardinality(String), environment LowCardinality(Nullable(String)), release LowCardinality(Nullable(String)), dist LowCardinality(Nullable(String)), transaction_name LowCardinality(String), message String, title String, user String, user_hash UInt64, user_id Nullable(String), user_name Nullable(String), user_email Nullable(String), ip_address_v4 Nullable(IPv4), ip_address_v6 Nullable(IPv6), sdk_name LowCardinality(Nullable(String)), sdk_version LowCardinality(Nullable(String)), http_method LowCardinality(Nullable(String)), http_referer Nullable(String), tags Nested(key String, value String), _tags_hash_map Array(UInt64), contexts Nested(key String, value String), span_id Nullable(UInt64), trace_id Nullable(UUID), deleted UInt8) ENGINE Distributed(`cluster_one_sh`, default, discover_local);
-- end forward migration discover : 0008_discover_fix_new_dist_table
-- backward migration discover : 0008_discover_fix_new_dist_table
Distributed op: DROP TABLE IF EXISTS discover_dist_new;
Local op: DROP TABLE IF EXISTS discover_local;
-- end backward migration discover : 0008_discover_fix_new_dist_table
-- forward migration discover : 0009_discover_fix_rename_dist_table
Distributed op: RENAME TABLE discover_dist TO discover_dist_temp;
Distributed op: RENAME TABLE discover_dist_new TO discover_dist;
Distributed op: DROP TABLE IF EXISTS discover_dist_temp;
-- end forward migration discover : 0009_discover_fix_rename_dist_table
-- backward migration discover : 0009_discover_fix_rename_dist_table
-- end backward migration discover : 0009_discover_fix_rename_dist_table |
Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time. ❌ Failed Test Results:Completed 1174 tests with View the full list of failed tests
|
@dbanda wait I thought self-hosted was the only thing we wanted to fix, since ST and SaaS actually have the same setup ? Seems less disruptive to change self-hosted that to change SaaS and ST? |
Closing this PR in favor of #5788 . I think changing self-hosted will be harder because the convention we use is that each storage has local and dist tables. If we drop the local table, we will not be able to run snuba on a single node without adding in extra code to make exceptions for discover which seems quite messy. I opted to instead just add discover local in SaaS and ST. The table wont be used, but it will just be there to keep things consistent. |
This is a follow up to #5788
In this migration we replace
discover_dist
table withdiscover_dist_new
that referencesdiscover_local
. This makes our SaaS environments and others consistent with the self-hosted one.