Skip to content

Commit

Permalink
feat(rollout): Make transaction query processors same (#3006)
Browse files Browse the repository at this point in the history
In order to map the transactions dataset to the transactions-tiger
cluster and make it seamless, have the same set of query processors
run for both.

Verified locally that applying the query processor on 20.7 cluster
does not have a negative impact
  • Loading branch information
nikhars authored Aug 2, 2022
1 parent 4e54be5 commit 8dab58a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions snuba/datasets/storages/transactions_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from snuba.query.processors.mapping_promoter import MappingColumnPromoter
from snuba.query.processors.prewhere import PrewhereProcessor
from snuba.query.processors.table_rate_limit import TableRateLimit
from snuba.query.processors.tuple_unaliaser import TupleUnaliaser
from snuba.query.processors.type_converters.hexint_column_processor import (
HexIntArrayColumnProcessor,
HexIntColumnProcessor,
Expand Down Expand Up @@ -134,6 +135,7 @@
["event_id", "trace_id", "span_id", "transaction_name", "transaction", "title"]
),
TableRateLimit(),
TupleUnaliaser(),
]

query_splitters = [TimeSplitQueryStrategy(timestamp_col="finish_ts")]
Expand Down
6 changes: 1 addition & 5 deletions snuba/datasets/storages/transactions_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
)
from snuba.datasets.table_storage import build_kafka_stream_loader_from_settings
from snuba.datasets.transactions_processor import TransactionsMessageProcessor
from snuba.query.processors.tuple_unaliaser import TupleUnaliaser
from snuba.subscriptions.utils import SchedulingWatermarkMode
from snuba.utils.streams.topics import Topic

Expand All @@ -25,14 +24,11 @@
part_format=[util.PartSegment.RETENTION_DAYS, util.PartSegment.DATE],
)

v2_query_processors = [*query_processors, TupleUnaliaser()]


storage = WritableTableStorage(
storage_key=StorageKey.TRANSACTIONS_V2,
storage_set_key=StorageSetKey.TRANSACTIONS_V2,
schema=schema,
query_processors=v2_query_processors,
query_processors=query_processors,
stream_loader=build_kafka_stream_loader_from_settings(
processor=TransactionsMessageProcessor(),
pre_filter=KafkaHeaderFilter("transaction_forwarder", "0"),
Expand Down

0 comments on commit 8dab58a

Please sign in to comment.