realAaronWu opened a new pull request, #440: URL: https://github.com/apache/paimon-cpp/pull/440
### Purpose Refs #435. This implements the cancellation slice only; planning-memory quotas remain open. Add a query-owned cancellation token to batch planning. Managed append-only scans with Avro manifest metadata can observe cancellation during metadata discovery, decoding, filtering, merging, grouping, packing, row counting, and before returning a plan. Latest and numeric-snapshot startup are supported; unsupported modes are explicitly refused. Opting in makes manifest planning synchronous and bypasses both shared manifest caches. Existing calls without a token retain their ordinary execution path. Blocking I/O, one decoder call, and CPU sorting are not interrupted. This does not bound planning memory or cancel subsequent data-file reading. New early returns guard Arrow roots and close readers/streams, preserving the original native error when cleanup also fails. A failed hint read that also observes cancellation preserves its original status; live queries keep best-effort hint fallback. ### Tests Local Linux x86_64 / GCC 15.3 / Debug, using the normal CMake/CTest entry points: - Common: 1,722 passed, 2 existing expected skips; core: 2,380 passed; scan: 87 passed; scan-and-read: 511 passed; read: 302 passed. - Real factory/CreatePlan cases cover supported startup modes, fixed/unaware buckets, cancellation boundaries, independent tokens, a separate-thread cancellation request during a paused manifest open, cache bypass/recovery, unsupported modes, error precedence, root release, and allocator lifetime. - Six supplemental debugger phase probes on the actual native executable verify progress stops at merge/group/packing/count checkpoints and before packing after sort. Thirteen isolated production guard-removal variants are rejected; an unmodified control passes. - Scoped ASan/UBSan/LSan: 16 production and 4 test translation units, all 29 new core cases passed. Other native, Arrow/format and GTest code is uninstrumented. A 4,097-byte leak control is detected. - Fixed-version all-files pre-commit hooks passed. Supplemental phase-evidence validation accepts the actual records and rejects 67 malformed/incomplete/error-status inputs, including contradictory suite counts and incomplete suites. This is a validation draft pending public CI. Local ARM, TSAN, a complete planner build with extra error context enabled, and cold provisioning are not claimed. The error-context assertion helper is separately checked with the actual Status implementation/macros enabled. ### API and Format Add `ScanCancellationToken`, `ScanContextBuilder::WithCancellationToken`, and an optional final ScanContext constructor argument. Rebuild the native library and paired consumers together: existing source usage is retained, not binary ABI. No storage-format change. ### Documentation Document supported modes, synchronous/cache costs, cooperative boundaries, error handling and compatibility in `docs/source/api/scan.rst`. ### Generative AI tooling Generated-by: OpenAI Codex (desktop; model/version not exposed). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
