Skip to content

docs: Pick lock type per module in AGENTS.md and REVIEWS.md - #6763

Merged
romtsn merged 1 commit into
mainfrom
docs/lock-guidance-per-module
Nov 25, 2026
Merged

romtsn merged 1 commit into
mainfrom
docs/lock-guidance-per-module

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

AGENTS.md told agents to prefer AutoClosableReentrantLock. REVIEWS.md told reviewers to prefer synchronized and called the lock legacy. Both files now give the same rule:

  • JVM and shared modules, including sentry core, use AutoClosableReentrantLock, because synchronized pins virtual threads on JDK 21–23 (see Virtual thread pinning on MainEventProcessor.ensureHostnameCache #3312). JDK 21 is an LTS, so we can't drop it yet.
  • Android-only modules (sentry-android-*) use synchronized, since Android has no virtual threads.
  • Don't rewrite existing locks just to switch between the two, and don't flag them in review.

#skip-changelog

via roman.

--

View Session [Sentry]

JVM and shared modules keep AutoClosableReentrantLock because synchronized
pins virtual threads on JDK 21-23. Android-only modules use synchronized,
since Android has no virtual threads.

Co-Authored-By: Roman Zavarnitsyn <[email protected]>
@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR risk: low

For commit 405759c.

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Nov 25, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.65.1 (1) release

⚙️ sentry-android Build Distribution Settings

@romtsn
romtsn marked this pull request as ready for review November 25, 2026 11:17
@romtsn
romtsn requested review from a team and adinauer as code owners November 25, 2026 11:17
@romtsn
romtsn requested review from 0xadam-brown and markushi and removed request for a team November 25, 2026 11:17
@github-actions github-actions Bot removed the risk: low PR risk score: low label Nov 25, 2026
@romtsn
romtsn enabled auto-merge (squash) November 25, 2026 11:17
@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 25, 2026
@romtsn
romtsn merged commit 193587d into main Nov 25, 2026
53 checks passed
@romtsn
romtsn deleted the docs/lock-guidance-per-module branch November 25, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants