Skip to content

[Bug]: TestRequestMultipleCn_ConcurrentSafety flaky — one node fails with closed connection #25734

Closed

Description

@matrix-meow

Problem

TestRequestMultipleCn_ConcurrentSafety in pkg/queryservice fails intermittently:

actual: 2 (expected 3)
Messages: All nodes should succeed
ERROR: close unix @->/tmp/cn-*-test_concurrent.sock: use of closed network connection

The test sends concurrent requests to 3 mock CN nodes, but one node's connection is closed before the request completes, causing only 2/3 nodes to succeed.

Recent Occurrences

Date PR/Run Job
2026-07-15 PR #25715 Coverage

Root Cause

Race condition in concurrent connection handling — one CN's Unix socket connection is closed before the request-response cycle completes, likely due to goroutine scheduling variability on CI runners.

Suggested Fix

  1. Add retry logic for transient connection failures in the test
  2. Or use synchronization to ensure all connections are established before sending requests
  3. Or increase connection timeout tolerance

Activity

  1. self-assigned this
    on Jul 15, 2026
  2. added a commit that references this issue on Jul 17, 2026
  3. daviszhen commented on Jul 17, 2026

    @daviszhen
    Contributor

    fixed

  4. ghost closed this as completedon Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions