Skip to content

ref(monitors): Re-enable ContextPropagatingThreadPoolExecutor in monitor consumer#111568

Merged
gricha merged 1 commit intomasterfrom
gricha/re-enable-context-propagation-monitor-consumer
Mar 25, 2026
Merged

ref(monitors): Re-enable ContextPropagatingThreadPoolExecutor in monitor consumer#111568
gricha merged 1 commit intomasterfrom
gricha/re-enable-context-propagation-monitor-consumer

Conversation

@gricha
Copy link
Member

@gricha gricha commented Mar 25, 2026

Re-applies the monitor consumer portion of #111464 (reverted in 7e509b5).

The revert was caused by a pymemcache.HashClient._retry_dead() race condition — Django's CacheHandler stores connections in a contextvar, and copy_context() caused all worker threads to share a single non-thread-safe HashClient. This is fixed by #111545, which gives each thread its own client.

Depends on #111545.

Agent transcript: https://claudescope.sentry.dev/share/bXndRR4KT3FDez_xnzf1nwcoicOkmF93CYhAl-bcoKY

…PropagatingThreadPoolExecutor

Re-applies the monitor consumer portion of #111464 (reverted in 7e509b5).
The original revert was due to a pymemcache HashClient thread-safety
issue triggered by contextvar-based cache connection sharing, which is
fixed by #111545.
@gricha gricha requested a review from a team as a code owner March 25, 2026 21:10
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 25, 2026
@gricha gricha requested review from markstory and trevor-e March 25, 2026 21:21
@gricha gricha merged commit 2485dc7 into master Mar 25, 2026
66 of 67 checks passed
@gricha gricha deleted the gricha/re-enable-context-propagation-monitor-consumer branch March 25, 2026 22:17
gricha added a commit that referenced this pull request Mar 26, 2026
…le S016 (#111569)

Re-applies the non-monitor-consumer portion of #111464 (reverted in
7e509b5): occurrence consumer, result consumer, and S016 lint rule
re-enablement.

Depends on #111545 and #111568.


Agent transcript:
https://claudescope.sentry.dev/share/Jgc7K9L3nJgpb6s4imUcdeHJ3iJNAmxOcsHq09hQW4M
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