Skip to content

fix(thrift): isolate annotation mappers per options - #119

Merged
wdp2020 merged 2 commits into
cloudwego:mainfrom
wdp2020:fix/annotation-mapper-isolation
Aug 21, 2026
Merged

fix(thrift): isolate annotation mappers per options#119
wdp2020 merged 2 commits into
cloudwego:mainfrom
wdp2020:fix/annotation-mapper-isolation

Conversation

@wdp2020

@wdp2020 wdp2020 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

This change isolates annotation mappers per thrift.Options instance using copy-on-write semantics. It also adds synchronization to the global mapper registry, preventing data races during concurrent registration, removal, and IDL parsing. Tests cover option isolation, copied options, and concurrent access.

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@wdp2020
wdp2020 merged commit 49283b0 into cloudwego:main Aug 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants