Skip to content

fix(arrow/flight/session): clone option values - #1044

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/flight-session-option-cloning
Open

fix(arrow/flight/session): clone option values#1044
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/flight-session-option-cloning

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

Clone mutable Flight session option protobufs when storing and retrieving individual option values.

Why

The stateful session implementation previously stored caller-owned pointers and returned its internal pointers after releasing the mutex. Callers could therefore mutate session state outside synchronization, despite the implementation's goroutine-safety contract.

The regression test covers both aliasing directions: modifying the input after SetSessionOption and modifying the value returned by GetSessionOption.

Validation

go test ./arrow/flight/session

go test -race ./arrow/flight/session

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 28, 2026 22:13
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.

1 participant