-
Notifications
You must be signed in to change notification settings - Fork 91
perf(vindex): enable 8-way multipart uploads for index files - #798
perf(vindex): enable 8-way multipart uploads for index files #798jerry-024 wants to merge 2 commits into
Conversation
Keep 8 MiB chunks and default FileIO upload concurrency at 1. Add multipart ordering, round-trip, and index build failure coverage. Validation: formatting and diff checks passed. Runtime tests and benchmarks remain blocked by a Cargo registry connection timeout.
jerry-024
commented
Sep 9, 2026
This PR should remain on hold until paimon-rust can use an official OpenDAL release containing apache/opendal#8224 (or an equivalent backport).
The change from concurrency 1 to 8 exposes a memory regression in the currently used OpenDAL implementation. Concurrent task results retain their original retry input, including the upload payload, even after a part succeeds. The multipart writer uses a hard-coded prefetch of 8192, so completed payloads can accumulate while more parts are submitted. Eight concurrent network uploads therefore do not bound retained payloads to eight 8 MiB parts, and large index builds can run out of memory. The previous concurrency-1 path does not accumulate completed inputs this way.
The upstream fix releases successful task inputs before result collection while retaining failed inputs for retry, preserving concurrent uploads. The upstream PR is merged, but merging upstream is not sufficient for this PR: the selected published dependency must actually contain the fix. Once that release is available, update the dependency and verify buffer release, retry correctness, and peak memory during a large 8-way upload before merging.
Use the native temporary file path so FileIO preserves the Windows drive prefix. Simplify redundant multipart and index upload failure assertions.
Uh oh!
There was an error while loading. Please reload this page.
Purpose
Reduce the vector-index serialization/upload bottleneck by allowing up to eight concurrent multipart uploads, while keeping each chunk at 8 MiB.
This is a standalone upload-only change. The existing single remote scan, training, and
addflow remain unchanged.Brief change log
async_writer_with_concurrency()helper. Existingasync_writer()callers retain concurrency 1 and 8 MiB chunks.FileIOProvidertest entry point. Reuse the existing build failure handling.Tests
Coverage added or updated; runtime acceptance is still pending:
cargo fmt --all -- --check.git diff --no-ext-diff --check.streaming_upload_osstest against real OSS multipart storage and verify scratch-object cleanup. It requiresPAIMON_CATALOG_OPTIONS,PAIMON_UPLOAD_TEST_DATABASE, andPAIMON_UPLOAD_TEST_TABLE.The vdb2 verification attempt stopped during dependency download, before compilation, because the Cargo registry connection timed out. Runtime correctness and performance acceptance have not been established; no measured speedup is claimed here.
API and Format
No public API or storage-format changes. Upload concurrency changes only for vector-index output.
Known existing limitation: the
AsyncWriteadapter does not expose multipart abort. The failure test explicitly records one unfinished upload and zero abort calls, separately from completed-object cleanup. This patch does not add multipart-abort support; real OSS failure cleanup still needs verification.Documentation
No new user-facing configuration. No documentation changes are included.