Skip to content

compaction: stop deduplicating profile rows in v2 - #6097

Open
alsoba13 wants to merge 1 commit into
mainfrom
alsoba13/v2-remove-compaction-dedupe
Open

alsoba13 wants to merge 1 commit into
mainfrom
alsoba13/v2-remove-compaction-dedupe

Conversation

@alsoba13

Copy link
Copy Markdown
Contributor

Summary

  • v2 has no write replication, so there are no duplicates for compaction to remove. Remove the DedupeProfileRowIterator, the WithDuplicateRowsCallback option, and the pyroscope_compaction_worker_duplicate_profile_rows_dropped_total metric.
  • Profiles that a client sends more than once are ingested as many times.
  • Document this in the v2 compaction, compaction-worker and segment-writer pages. The segment-writer page previously said repeated profiles were resolved during compaction.
  • The v1 compactor is unchanged.

Test plan

  • go test ./pkg/block/ ./pkg/compactionworker/
  • Test_Compact_DuplicateRows removed along with the feature

v2 has no write replication, so compaction has no duplicates to remove.
Profiles sent more than once by a client are ingested as many times.

Remove the dedupe iterator, the duplicate rows callback and the
pyroscope_compaction_worker_duplicate_profile_rows_dropped_total metric,
and document the behavior. The v1 compactor is unchanged.
@alsoba13
alsoba13 marked this pull request as ready for review November 13, 2026 09:22
@alsoba13
alsoba13 requested review from a team, marcsanmi and simonswine as code owners November 13, 2026 09:22

@bryanhuhta bryanhuhta 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.

LGTM

require.Equal(t, expected, actual)
}

func Test_Compact_DuplicateRows(t *testing.T) {

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.

Maybe we can add a test to show duplicates are preserved?

}, []string{"status"}),

duplicateRowsDropped: prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "duplicate_profile_rows_dropped_total",

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.

Let's also remember to update any dashboards that reference this metric!

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.

2 participants