Skip to content

perf: read-write-locked scope data - #2042

Merged
jpnurmi merged 6 commits into
masterfrom
jpnurmi/perf/rwscope
Sep 20, 2026
Merged

jpnurmi merged 6 commits into
masterfrom
jpnurmi/perf/rwscope

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Protect scope data with read-write locks, allowing concurrent scope data readers for logs and metrics enrichment.

To be merged together with #2091 that removes the global scope mutex, which is the final step to actually allow parallel reads of the newly RW-locked scope data.

Ref: #1862

#skip-changelog (#2091)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread src/backends/sentry_backend_native.c
Comment thread src/sentry_core.c
@jpnurmi jpnurmi changed the title [0.17] ref: read-write-locked scope data [0.17] perf: read-write-locked scope data Sep 1, 2026
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.10977% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.00%. Comparing base (8183ab7) to head (233ea8b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2042      +/-   ##
==========================================
+ Coverage   74.74%   75.00%   +0.25%     
==========================================
  Files         103      103              
  Lines       27449    27784     +335     
  Branches     4966     5055      +89     
==========================================
+ Hits        20518    20838     +320     
- Misses       5585     5587       +2     
- Partials     1346     1359      +13     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi jpnurmi mentioned this pull request Sep 2, 2026
4 tasks
@jpnurmi
jpnurmi removed this pull request from stack #2010 September 9, 2026 10:32
@jpnurmi
jpnurmi added this pull request to stack #2080 September 9, 2026 10:32
@jpnurmi
jpnurmi removed this pull request from stack #2080 September 9, 2026 11:37
@jpnurmi jpnurmi changed the title [0.17] perf: read-write-locked scope data [WIP] perf: read-write-locked scope data Sep 9, 2026
Base automatically changed from jpnurmi/perf/rwlock to master September 9, 2026 19:42
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch from aab5243 to 03a2558 Compare September 9, 2026 19:53
@jpnurmi
jpnurmi changed the base branch from master to jpnurmi/ref/attachments September 9, 2026 19:53
@jpnurmi
jpnurmi added this pull request to stack #2082 September 9, 2026 19:54
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch 2 times, most recently from 8ed8d1c to a13e8c5 Compare September 10, 2026 11:51
@jpnurmi
jpnurmi removed this pull request from stack #2082 September 10, 2026 11:51
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch from a13e8c5 to a725ba4 Compare September 10, 2026 11:57
@jpnurmi
jpnurmi changed the base branch from jpnurmi/ref/attachments to jpnurmi/ref/scope-data September 10, 2026 11:58
@jpnurmi
jpnurmi added this pull request to stack #2084 September 10, 2026 11:58
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch from a725ba4 to 173727a Compare September 11, 2026 13:14
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch from 173727a to d95babc Compare September 11, 2026 13:22
Base automatically changed from jpnurmi/ref/scope-data to master September 14, 2026 04:33
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch 2 times, most recently from aafa196 to c837883 Compare September 14, 2026 07:04
@jpnurmi
jpnurmi removed this pull request from stack #2084 September 14, 2026 07:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread src/sentry_scope.c
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch 2 times, most recently from 61f639d to 01a68ec Compare September 14, 2026 09:24
Comment thread src/sentry_scope.c
Base automatically changed from jpnurmi/ref/observe-strings to master September 14, 2026 09:58
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch from 01a68ec to a264a59 Compare September 14, 2026 09:58
@jpnurmi jpnurmi changed the title [WIP] perf: read-write-locked scope data perf: read-write-locked scope data Sep 14, 2026
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch from a264a59 to 3b8bac9 Compare September 15, 2026 06:45
Comment thread src/sentry_scope.c Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1107fe2. Configure here.

Comment thread src/sentry_scope.c Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch 2 times, most recently from cbdb1be to 4b030e3 Compare September 18, 2026 14:53
Protect scope data with per-scope read-write locks and retain stable
values or snapshots when data must outlive a locked access.

Keep the global scope mutex and existing observer synchronization in
place so the data locking can be reviewed independently of removing
global serialization.
@jpnurmi
jpnurmi force-pushed the jpnurmi/perf/rwscope branch from 4b030e3 to 233ea8b Compare September 19, 2026 18:53
@jpnurmi
jpnurmi merged commit 8e8e91a into master Sep 20, 2026
65 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/perf/rwscope branch September 20, 2026 06:28
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