Skip to content

fix(arrow/flight/session): fix flaky race condition test#687

Merged
zeroshade merged 7 commits into
apache:mainfrom
zeroshade:stateful-session-race-test
Mar 5, 2026
Merged

fix(arrow/flight/session): fix flaky race condition test#687
zeroshade merged 7 commits into
apache:mainfrom
zeroshade:stateful-session-race-test

Conversation

@zeroshade

Copy link
Copy Markdown
Member

Rationale for this change

Address crash caused by race condition exemplified by https://github.com/apache/arrow-go/actions/runs/22678156759/job/65740770847

When a session is closed, the server removes it from the store and sends a trailer with Max-Age=0 to tell the client to remove the cookie. If the client makes a new request before processing this trailer, it sends the stale cookie with the closed session id. Instead of returning ErrNoSession it got a session not found error.

What changes are included in this PR?

Catch the session not found error from the store and return ErrNoSession so that it properly creates a new session in this case.

Are these changes tested?

yes

Are there any user-facing changes?

no

@zeroshade zeroshade requested review from kou and lidavidm March 4, 2026 16:44
@zeroshade

Copy link
Copy Markdown
Member Author

Hey, I think i finally got it!

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@zeroshade zeroshade merged commit 2895752 into apache:main Mar 5, 2026
23 checks passed
@zeroshade zeroshade deleted the stateful-session-race-test branch March 27, 2026 15:19
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.

3 participants