Repository navigation
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
LOAD DATA ... parallel "true"writes object data to shared COS via FileService.- Transient TCP reset on COS internal VIP (
169.254.0.47:443) aborts PUT. QCloudSDK.putObjectreturns error immediately — no retry loop (unlike AWS SDK path which wraps PUT with retry).- 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
- Deploy MO ~
024703548on Guangzhou nightly cluster with QCloud COS fileservice. - Run Prepare Load:
(10 tables × 10M rows as in nightly workflow.)
LOAD DATA URL s3option {... bucket="mo-load-guangzhou-1308875761" ...} INTO TABLE sbtest1 ... PARALLEL "true"; - Induce or wait for COS
connection reset by peeron PUT tomo-benchmark-<run_id>/data/.... - Observe ERROR 20101; Loki:
{namespace="mo-main-commit-024703548-20260609"} |= "connection reset by peer"
Activity
fix: retry QCloud PUT with seekable reader (#24917)
fix: retry QCloud PUT with seekable reader (matrixorigin#24917)
fix: retry QCloud PUT with seekable reader (matrixorigin#24917)
fix: retry QCloud PUT with seekable reader (matrixorigin#24917)