Skip to content

Stop writing to the attributes_array column in the EAP consumer#8179

Merged
phacops merged 1 commit into
masterfrom
claude/remove-attributes-array-b2xpek
Jul 14, 2026
Merged

Stop writing to the attributes_array column in the EAP consumer#8179
phacops merged 1 commit into
masterfrom
claude/remove-attributes-array-b2xpek

Conversation

@phacops

@phacops phacops commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Array-valued attributes are already written to the typed Map(String, Array(T)) columns (attributes_array_string / _int / _float / _bool) added in migration 0059, which the read path uses for filtering, aggregation, and key enumeration via mapKeys(...). The legacy attributes_array JSON column is no longer needed on the write path.

This PR removes the attributes_array column from the EAP consumer processor:

  • Drop the attributes_array field from the AttributeMap and EAPItemRow structs.
  • Remove "attributes_array" from EAPItemRow::COLUMN_NAMES, so it is excluded from the explicit RowBinary insert column list.
  • Stop serializing it in TryFrom<EAPItem>; insert_array now only populates the typed columns.
  • Remove the now-unused EAPValue enum.
  • Update unit tests to assert against the typed columns instead of the JSON column.

The physical attributes_array column is intentionally left in the ClickHouse schema (migrations and storage YAML are unchanged). Because it is excluded from the explicit insert column list, ClickHouse fills it with its default value on every insert. Removing the column itself would be a separate migration.

Testing

cargo check --lib and the eap_items unit tests pass. The only failing test is test_row_binary_clickhouse_insert, which requires a live ClickHouse instance and fails here with connection-refused (unrelated to this change); its generated insert column list correctly skips attributes_array.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

🤖 Generated with Claude Code


Generated by Claude Code

Array-valued attributes are already written to the typed
`Map(String, Array(T))` columns (attributes_array_string/int/float/bool)
added in migration 0059, which the read path uses for filtering,
aggregation, and key enumeration. The legacy `attributes_array` JSON
column is no longer needed on the write path.

Remove the `attributes_array` field from the `AttributeMap` and
`EAPItemRow` structs, drop it from the RowBinary insert column list, and
stop serializing it in `TryFrom<EAPItem>`. `insert_array` now only
populates the typed columns. The unused `EAPValue` enum is removed and
tests are updated to assert against the typed columns.

The physical column is left in the ClickHouse schema; since it is
excluded from the explicit insert column list, ClickHouse fills it with
its default value.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KuSMmqtpjLyDRuq4yY3LuX
@phacops phacops requested a review from a team as a code owner July 13, 2026 22:35

@onewland onewland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

curious to see if we immediately see load reduced for merges getting much simpler after dropping this column

@phacops phacops merged commit 7e0a5d7 into master Jul 14, 2026
68 checks passed
@phacops phacops deleted the claude/remove-attributes-array-b2xpek branch July 14, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants