Skip to content

[Bug]: COS fileservice PUT connection reset during Load #24916

Closed

Description

Environment

Field Value
GitHub Actions run 27181418714
Namespace mo-main-commit-024703548-20260609
Commit 024703548 (main)
Cluster Guangzhou nightly TKE
Workload 1.Prepare Load Sysbench1000w Test Data, TPCC/load parallel LOAD DATA
COS path mo-nightly-gz-1308875761/mo-benchmark-27181418714/
COS VIP 169.254.0.47:443 (Guangzhou VPC internal)

Scope: During nightly bulk LOAD DATA ... parallel "true", MatrixOne FileService COS PUT fails with connection reset by peer. MO wraps the Go error as ERROR 20101 (convert go error to mo error). IsRetryableError already classifies connection reset as retryable, but QCloudSDK.putObject explicitly does not retry — causing Prepare Load / TPCC load failures.

Summary

In run 27181418714, step 1.Prepare Load Sysbench1000w Test Data fails with:

ERROR 20101 (HY000): internal error: convert go error to mo error
Put "https://mo-nightly-gz-1308875761.cos.ap-guangzhou.myqcloud.com/mo-benchmark-27181418714/data/...":
write tcp 10.143.28.68:44840->169.254.0.47:443: write: connection reset by peer

Loki evidence (cluster loki-read, namespace above):

Query Result
|= "connection reset by peer" 30+ lines; pods tp-cn-pgb6g, tp-cn-8dl9v, proxy
|= "convert go error to mo error" 6 lines; same PUT path
Statement context load data url s3option ... bucket=mo-load-guangzhou-1308875761

Timestamps (UTC → CST):

  • 06:52 UTC (14:52 CST) — first burst during parallel LOAD
  • 08:40 UTC (16:40 CST) — second burst before sysbench1000w OLTP cases

Because mo-nightly-regression workflow uses if: always() && !cancelled() on subsequent sysbench steps, OLTP tests continue after Prepare Load fails — amplifying impact (partial sysbench_db data).

Root cause (MatrixOne)

Mechanism

  1. LOAD DATA ... parallel "true" writes object data to shared COS via FileService.
  2. Transient TCP reset on COS internal VIP (169.254.0.47:443) aborts PUT.
  3. QCloudSDK.putObject returns error immediately — no retry loop (unlike AWS SDK path which wraps PUT with retry).
  4. Frontend wraps via ConvertGoError → client sees ERROR 20101.

Code gap

pkg/fileservice/error.go — IsRetryableError includes "connection reset by peer".

pkg/fileservice/qcloud_sdk.go — putObject:

// not retryable because Reader may be half consumed
_, err = a.client.Object.Put(ctx, key, r, opts)

AWS SDK v2 putObject uses DoWithRetry(..., IsRetryableError); QCloud path is inconsistent.

Why this is a MO bug (not pure COS infra)

Check Result
Error class connection reset by peer — already retryable in MO
AWS SDK path Has retry wrapper
QCloud SDK path No retry on PUT
Client impact Entire Prepare Load batch fails on single transient reset
Infra-only? Even if COS blips, MO should retry idempotent PUT segments

Expected vs actual

Expected Actual
Transient COS TCP reset → retry PUT Single reset → 20101, Prepare Load fails
Consistent retry policy across S3 backends AWS retries; QCloud PUT does not
Prepare Load failure blocks dependent OLTP Workflow continues (always()) — CI issue, but MO should be resilient

Proposed fixes (matrixone)

P0 — QCloud PUT retry with safe reader

pkg/fileservice/qcloud_sdk.go putObject:

  • Wrap PUT with DoWithRetry(..., IsRetryableError) like AWS path.
  • On retry: use seekable / re-readable source (buffer, temp file, or offset reader) so half-consumed reader problem is solved — same pattern as other backends.

P1 — Align error surfacing

  • Distinguish retriable COS errors from hard failures in logs/metrics.
  • Optional: metric mo_fs_cos_put_retry_total / mo_fs_cos_put_fail_total.

P2 — CI (mo-nightly-regression, separate PR)

  • Gate sysbench1000w OLTP on Prepare Load success — not MO core, but prevents testing on empty/partial data.

Reproduce

  1. Deploy MO ~024703548 on Guangzhou nightly cluster with QCloud COS fileservice.
  2. Run Prepare Load:
    LOAD DATA URL s3option {... bucket="mo-load-guangzhou-1308875761" ...}
    INTO TABLE sbtest1 ... PARALLEL "true";
    (10 tables × 10M rows as in nightly workflow.)
  3. Induce or wait for COS connection reset by peer on PUT to mo-benchmark-<run_id>/data/....
  4. Observe ERROR 20101; Loki:
    {namespace="mo-main-commit-024703548-20260609"} |= "connection reset by peer"
    

Activity

  1. ghost added this to the MO-202606 milestone on Jun 10, 2026
  2. ghost added theissue type on Jun 10, 2026
  3. ghost added
    kind/bug
    on Jun 10, 2026
  4. ghost added
    severity/s0
    on Jun 10, 2026
  5. added a commit that references this issue on Jun 11, 2026
    0a24a13
  6. added 3 commits that reference this issue on Sep 17, 2026
    68fb916
    0658e54
    91aeca8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions