Skip to content

test(arrowload): reduce fanout fixture cost - #28782

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/arrow-fanout-bvt-cardinality-20260912
Sep 12, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/arrow-fanout-bvt-cardinality-20260912

Conversation

@XuPeng-SH

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #28781

What this PR does / why we need it:

  • Reduce the functional Arrow record-batch fanout fixture from 100,000 to 25,600 rows while retaining all 100 IPC record batches. A runtime size assertion keeps it above the 1 MiB LOAD threshold, and the full row identity/payload checks remain. The 100,000-row benchmark fixture is unchanged.
  • Make LocalMinIO bucket setup idempotent only for BucketAlreadyOwnedByYou, which can follow a server-side bucket create whose response was lost. Other errors remain failures.
  • Add a deterministic lost-response test using the MinIO SDK and an in-process HTTP server.
  • No production SQL behavior changes.

Test Plan

  • On the 55 Linux/x86 host: full TestArrowLoadBVT (including DistributedRecordBatchFanout and LocalMinIO) passed; TestArrowLoadForceMaterializeFallback passed.
  • TestArrowLoadBucketCreateComplete, TestArrowLoadBucketRetryAfterLostCreateResponse, and TestRetryArrowLoadBucketStopsOnCancellation passed normally and under -race.
  • go vet -mod=readonly ./pkg/tests/arrowload, gofmt, and git diff --check passed.
  • The 55-host test evidence used the unchanged source diff before rebasing; the rebase added only upstream fix(plan): preserve grouped ENUM/SET numeric semantics #28751 and fix: align SOUNDEX with MySQL semantics #28760, which do not touch the Arrow LOAD test paths. CI on the final head has not been awaited.
  • Local golangci-lint could not run because the installed binary targets Go 1.24.4 while this repository requires Go 1.26.4; CI static analysis remains the final check.
  • The fanout case is smaller by row count while preserving its batch count and LOAD path. Timing samples varied, so this PR does not claim a statistically established end-to-end suite speedup.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Deep review of 8e13e8844a260d93872c571bc86e8c6d12eaf472 (self-authored PR; comment only).

No blocking issue found in the fixture reduction or MinIO retry fix. The >1 MiB assertion correctly preserves LoadWriteS3; the 100 batches and complete row/payload checks remain, while the 100k-row benchmark is unchanged. The bucket helper treats only success and BucketAlreadyOwnedByYou as completion, retries are bounded/cancellable, and the injected lost-response test exercises the create-then-retry case. Exact-head UT/SCA/CI Required are green; note LocalMinIO was skipped in CI, with the real-MinIO run described in the PR body as pre-rebase evidence.

One non-blocking accuracy note: the BVT comment says the local file is split into worker scopes / preserves record-batch fanout. The fixture is ~1.7 MiB, and LoadParallelMinSize is colexec.WriteS3Threshold (128 MiB); build_load.go clears Param.Parallel below that threshold, while record-shard planning requires it. The old ~6.5 MiB fixture was below the same threshold, so this PR does not reduce existing coverage, but this BVT does not actually prove record-batch fanout. The unit routing coverage in pkg/sql/compile/arrow_scope_test.go is separate. Please adjust the BVT/helper/PR wording to say it preserves the LoadWriteS3/parallel-load insertion path and row-batch correctness, not end-to-end record-batch fanout. Raising this BVT above 128 MiB would defeat the cost reduction and is not necessary for this bounded change.

VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#28781

## What this PR does / why we need it:

- Reduce the functional Arrow record-batch fanout fixture from 100,000
to 25,600 rows while retaining all 100 IPC record batches. A runtime
size assertion keeps it above the 1 MiB LOAD threshold, and the full row
identity/payload checks remain. The 100,000-row benchmark fixture is
unchanged.
- Make LocalMinIO bucket setup idempotent only for
`BucketAlreadyOwnedByYou`, which can follow a server-side bucket create
whose response was lost. Other errors remain failures.
- Add a deterministic lost-response test using the MinIO SDK and an
in-process HTTP server.
- No production SQL behavior changes.

## Test Plan

- On the 55 Linux/x86 host: full `TestArrowLoadBVT` (including
`DistributedRecordBatchFanout` and `LocalMinIO`) passed;
`TestArrowLoadForceMaterializeFallback` passed.
- `TestArrowLoadBucketCreateComplete`,
`TestArrowLoadBucketRetryAfterLostCreateResponse`, and
`TestRetryArrowLoadBucketStopsOnCancellation` passed normally and under
`-race`.
- `go vet -mod=readonly ./pkg/tests/arrowload`, gofmt, and `git diff
--check` passed.
- The 55-host test evidence used the unchanged source diff before
rebasing; the rebase added only upstream matrixorigin#28751 and matrixorigin#28760, which do not
touch the Arrow LOAD test paths. CI on the final head has not been
awaited.
- Local golangci-lint could not run because the installed binary targets
Go 1.24.4 while this repository requires Go 1.26.4; CI static analysis
remains the final check.
- The fanout case is smaller by row count while preserving its batch
count and LOAD path. Timing samples varied, so this PR does not claim a
statistically established end-to-end suite speedup.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#28781

## What this PR does / why we need it:

- Reduce the functional Arrow record-batch fanout fixture from 100,000
to 25,600 rows while retaining all 100 IPC record batches. A runtime
size assertion keeps it above the 1 MiB LOAD threshold, and the full row
identity/payload checks remain. The 100,000-row benchmark fixture is
unchanged.
- Make LocalMinIO bucket setup idempotent only for
`BucketAlreadyOwnedByYou`, which can follow a server-side bucket create
whose response was lost. Other errors remain failures.
- Add a deterministic lost-response test using the MinIO SDK and an
in-process HTTP server.
- No production SQL behavior changes.

## Test Plan

- On the 55 Linux/x86 host: full `TestArrowLoadBVT` (including
`DistributedRecordBatchFanout` and `LocalMinIO`) passed;
`TestArrowLoadForceMaterializeFallback` passed.
- `TestArrowLoadBucketCreateComplete`,
`TestArrowLoadBucketRetryAfterLostCreateResponse`, and
`TestRetryArrowLoadBucketStopsOnCancellation` passed normally and under
`-race`.
- `go vet -mod=readonly ./pkg/tests/arrowload`, gofmt, and `git diff
--check` passed.
- The 55-host test evidence used the unchanged source diff before
rebasing; the rebase added only upstream matrixorigin#28751 and matrixorigin#28760, which do not
touch the Arrow LOAD test paths. CI on the final head has not been
awaited.
- Local golangci-lint could not run because the installed binary targets
Go 1.24.4 while this repository requires Go 1.26.4; CI static analysis
remains the final check.
- The fanout case is smaller by row count while preserving its batch
count and LOAD path. Timing samples varied, so this PR does not claim a
statistically established end-to-end suite speedup.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#28781

## What this PR does / why we need it:

- Reduce the functional Arrow record-batch fanout fixture from 100,000
to 25,600 rows while retaining all 100 IPC record batches. A runtime
size assertion keeps it above the 1 MiB LOAD threshold, and the full row
identity/payload checks remain. The 100,000-row benchmark fixture is
unchanged.
- Make LocalMinIO bucket setup idempotent only for
`BucketAlreadyOwnedByYou`, which can follow a server-side bucket create
whose response was lost. Other errors remain failures.
- Add a deterministic lost-response test using the MinIO SDK and an
in-process HTTP server.
- No production SQL behavior changes.

## Test Plan

- On the 55 Linux/x86 host: full `TestArrowLoadBVT` (including
`DistributedRecordBatchFanout` and `LocalMinIO`) passed;
`TestArrowLoadForceMaterializeFallback` passed.
- `TestArrowLoadBucketCreateComplete`,
`TestArrowLoadBucketRetryAfterLostCreateResponse`, and
`TestRetryArrowLoadBucketStopsOnCancellation` passed normally and under
`-race`.
- `go vet -mod=readonly ./pkg/tests/arrowload`, gofmt, and `git diff
--check` passed.
- The 55-host test evidence used the unchanged source diff before
rebasing; the rebase added only upstream matrixorigin#28751 and matrixorigin#28760, which do not
touch the Arrow LOAD test paths. CI on the final head has not been
awaited.
- Local golangci-lint could not run because the installed binary targets
Go 1.24.4 while this repository requires Go 1.26.4; CI static analysis
remains the final check.
- The fanout case is smaller by row count while preserving its batch
count and LOAD path. Timing samples varied, so this PR does not claim a
statistically established end-to-end suite speedup.

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Arrow LOAD BVT retries a completed MinIO bucket create and over-sizes fanout data

2 participants