cockroachdb / cockroachdb/cockroach

drpc: improve DRPC metadata context behavior for Add, Get

Open
#151,194 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.