Skip to content

Fix flaky int-test failure by making NettyClient response queue thread-safe - #3282

Draft
beijxu with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-failure
Draft

Fix flaky int-test failure by making NettyClient response queue thread-safe#3282
beijxu with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-failure

Conversation

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown

Summary

This addresses the intermittent failure in Github Actions CI / int-test (pull_request) where FrontendIntegrationTest could throw IllegalStateException (Should have received response...) after request completion.
Root cause was cross-thread access to NettyClient.responseParts using a non-thread-safe LinkedList.

  • Root cause

    • responseParts is produced on Netty I/O threads and consumed on test threads.
    • Using LinkedList could expose stale/empty reads under race, especially around channel close completion.
  • Change

    • Replaced LinkedList<HttpObject> with ConcurrentLinkedQueue<HttpObject> in NettyClient.
  • Effect

    • Preserves existing behavior while providing safe concurrent visibility for response parts, eliminating the observed flake path.
// NettyClient.java
private final Queue<HttpObject> responseParts = new ConcurrentLinkedQueue<HttpObject>();

Testing Done

Validated by re-running the previously failing frontend integration test path (multipartPostGetHeadUpdateDeleteUndeleteTest) and the containing FrontendIntegrationTest suite.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Fix flaky int-test failure by making NettyClient response queue thread-safe Aug 12, 2026
Copilot AI requested a review from beijxu August 12, 2026 04:53
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