Skip to content

ref(spans): Remove zero-copy-dest-threshold option and SUNIONSTORE codepath#110759

Merged
untitaker merged 3 commits intomasterfrom
untitaker/ref/remove-sunionstore-codepath
Mar 17, 2026
Merged

ref(spans): Remove zero-copy-dest-threshold option and SUNIONSTORE codepath#110759
untitaker merged 3 commits intomasterfrom
untitaker/ref/remove-sunionstore-codepath

Conversation

@untitaker
Copy link
Member

The SMEMBERS+SADD path is now always used for merging Redis sets in the
span buffer. SUNIONSTORE re-serialises the entire destination set on
every call, making it O(destination + sources), while SMEMBERS+SADD is
O(sources) only. The option was permanently set to 1 in production,
so the branching logic and option are no longer needed.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

@untitaker untitaker marked this pull request as ready for review March 16, 2026 17:08
@untitaker untitaker requested review from a team as code owners March 16, 2026 17:08
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 16, 2026
@github-actions
Copy link
Contributor

Backend Test Failures

Failures on 5693b3b in this run:

tests/sentry/spans/test_buffer.py::test_partition_routing_stable_across_rebalancelog
src/sentry/testutils/thread_leaks/pytest.py:44: in pytest_runtest_call
    yield result
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:1424: in patched
    return func(*newargs, **newkeywargs)
E   TypeError: test_partition_routing_stable_across_rebalance() takes 0 positional arguments but 1 was given

…depath

The SMEMBERS+SADD path is now always used for merging Redis sets in the
span buffer. SUNIONSTORE re-serialises the entire destination set on
every call, making it O(destination + sources), while SMEMBERS+SADD is
O(sources) only. The option was permanently set to 1 in production,
so the branching logic and option are no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@untitaker untitaker merged commit 1974988 into master Mar 17, 2026
61 checks passed
@untitaker untitaker deleted the untitaker/ref/remove-sunionstore-codepath branch March 17, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants