-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eap-spans): Drop indexes on attribute keys bucket 0 (#6213)
- Loading branch information
Showing
3 changed files
with
39 additions
and
3 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
24 changes: 24 additions & 0 deletions
24
snuba/snuba_migrations/events_analytics_platform/0008_drop_index_attribute_key_bucket_0.py
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,24 @@ | ||
from typing import Sequence | ||
|
||
from snuba.clusters.storage_sets import StorageSetKey | ||
from snuba.migrations import migration, operations | ||
|
||
|
||
class Migration(migration.ClickhouseNodeMigration): | ||
blocking = False | ||
|
||
def forwards_ops(self) -> Sequence[operations.SqlOperation]: | ||
return [ | ||
operations.DropIndex( | ||
storage_set=StorageSetKey.EVENTS_ANALYTICS_PLATFORM, | ||
table_name="eap_spans_local", | ||
index_name=index_name, | ||
target=operations.OperationTarget.LOCAL, | ||
run_async=True, | ||
) | ||
for bucket in {0} | ||
for index_name in {f"bf_attr_num_{bucket}", f"bf_attr_str_{bucket}"} | ||
] | ||
|
||
def backwards_ops(self) -> Sequence[operations.SqlOperation]: | ||
return [] |
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