cockroachdb / cockroachdb/cockroach
drpc: improve DRPC metadata context behavior for Add, Get
Open
C-enhancement
T-db-server
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
- The `Add` method should create a new context rather than manipulating the existing metadata of the context.
- Similarly, `Get` should return a copy of the metadata, not the entire original map itself.
- If we make the above change and `Add` creates a new context, then `AddPairs` should not use `Add`.
Reference: https://github.com/cockroachdb/drpc/blob/main/drpcmetadata/metadata.go
Jira issue: CRDB-53113
Contributor guide
Assessment
This issue has not been assessed yet.