Skip to content

Conversation

shubhamdhama
Copy link

This prevents mutation of metadata maps stored in context by ensuring Get() returns a copy and Add()/AddPairs() work with copies rather than modifying the original map in place.

This prevents mutation of metadata maps stored in context by ensuring Get()
returns a copy and Add()/AddPairs() work with copies rather than modifying
the original map in place.
Copy link

@cthumuluru-crdb cthumuluru-crdb left a comment

Choose a reason for hiding this comment

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

lgtm!

@shubhamdhama shubhamdhama merged commit 3b344ab into cockroachdb:main Sep 22, 2025
shubhamdhama added a commit to shubhamdhama/cockroach that referenced this pull request Sep 24, 2025
Changes:
- [PR cockroachdb#16: drpcwire: replace drpcerr with gRPC status protobuf for error marshaling](cockroachdb/drpc#16)
- [PR cockroachdb#17: drpcmetadata: ensure metadata immutability by returning copy](cockroachdb/drpc#17)

Release note: none
Epic: none
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request Sep 24, 2025
154009: go.mod: bump drpc to 78d4e121902a r=shubhamdhama a=shubhamdhama

Changes:
- [PR #16: drpcwire: replace drpcerr with gRPC status protobuf for error marshaling](cockroachdb/drpc#16)
- [PR #17: drpcmetadata: ensure metadata immutability by returning copy](cockroachdb/drpc#17)

Release note: none
Epic: none
Fixes: #153885

Co-authored-by: Shubham Dhama <shubham.dhama@cockroachlabs.com>
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.

2 participants