Repository navigation
fix(clickhouse): key structlog synthetic rows apart from their CALL row - #927
Merged
Merged
Conversation
execution-processor adds a row after every CALL-family opcode whose target ran no code. It reuses the CALL's index, so it shared the full sorting key of canonical_execution_transaction_structlog with the CALL row and ReplacingMergeTree kept only one of the two. Migration 023 adds a Bool `synthetic` column and appends it to the sorting key in the same ALTER, which ClickHouse applies as a metadata-only change (no part rewrite, no mutation; the primary index stays on the old four columns). It also documents call_to_address for CREATE/CREATE2 rows.
samcm
force-pushed
the
feat/structlog-synthetic-key
branch
from
October 20, 2026 09:44
3b4825b to
5722605
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
execution-processor writes an extra row after every CALL-family opcode whose target ran no code. It reuses the CALL's
index, so it had the same sorting key as the CALL row incanonical_execution_transaction_structlogand ReplacingMergeTree kept only one of the two.Migration 023 adds a
synthetic Boolcolumn to both tables and appends it to the_localsorting key in the same ALTER, which ClickHouse applies as a metadata-only change (existing parts are not rewritten, and the primary index stays on the original four columns). It also rewrites thecall_to_addresscomment to cover CREATE/CREATE2 rows and regenerates the structlog files inpkg/proto/clickhouse. The processor side, which setssynthetic = trueon those rows, ships in execution-processor v0.4.0.