[Feature] Add query-scoped planning limits and cooperative cancellation
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 8/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
This is design work, so start by reading the API surfaces in include/paimon/scan_context.h and include/paimon/table/source/table_scan.h, then the limit ordering in src/paimon/core/table/source/data_table_batch_scan.cpp and the manifest fan-out in src/paimon/core/operation/file_store_scan.cpp (ReadFileEntries). The first step is agreeing the API shape with maintainers on this thread. Done means an approved contract plus tests that inject allocation, I/O and submission failures.
由索引模型根据 Issue 内容生成。
描述
Parent integration: sirius-db/sirius#2181. Consumer bridge tracking: polardb/duckdb-paimon#139.
Need
A database embedding paimon-cpp needs to admit planning work before materializing an arbitrarily large native plan, and stop submitting work after cooperative cancellation. This is a feature request, not a claim that existing standalone planning is incorrect.
The integration pins 53f9c86d45aabb0a6f1a379271da07d7a9f27a3d. The following API gap also remains in inspected main 242decffdfdefef01dcd0e52e48c9a1e69792479:
ScanContextBuilder::WithMemoryPoolroutes pool-backed allocations, but does not bound ordinary STL planning containers or their transitive metadata allocations.TableScan::CreatePlan()returns a complete plan; it exposes no planning cancellation/budget contract.SetLimitis a row-result pushdown, not a planning-memory quota:DataTableBatchScan::CreatePlancallsstarting_scanner_->ScanbeforeApplyPushDownLimit.FileStoreScan::ReadFileEntriesbuilds a vector of futures for all supplied manifest metadata, then collects complete per-manifest entry vectors. A custom serial executor can prevent concurrent task execution, but does not itself bound those retained containers/results.
Source references at the inspected main:
Proposed Contract To Discuss
Provide optional query-scoped planning controls, preserving existing unlimited behavior by default. The API shape should be agreed with maintainers; a post-plan split-count check is not sufficient.
- Check conservative manifest/entry/split/retained-metadata quotas before the corresponding allocation or task submission; identify which allocations are covered and what remains outside the guarantee.
- Bound outstanding manifest work and retained results, including ordinary containers, rather than only pool-backed buffers.
- Check a cooperative cancellation token before I/O/submission and inside substantial decode/merge loops. Do not promise interruption of an arbitrary blocking filesystem call unless the filesystem supports it.
- Return a distinguishable resource-refusal/cancellation status, never partial success or EOF. Stop new submissions and drain accepted work before returning, including exceptions and submission failure.
- Avoid changing process-global executors, Arrow thread capacity, or allocation resources.
Acceptance tests should use many small manifests and injected allocation/I/O/submission failures. Assert the limit is enforced before excess work is accepted, accepted jobs are drained on every terminal path, and cancellation cannot return a partial successful plan. Include serial/nested executor configurations to guard against deadlock. Keep row LIMIT semantics separate.
This issue does not request another Arrow batch-lifetime implementation; that work already exists in #259/#260. No hard whole-process-memory bound or prompt cancellation of uninterruptible I/O is claimed by the current integration.
- 主要语言
- C++
- 星标
- 68
- 派生
- 34
- 平均合并
- 4 天 37 分钟
- 30 天内合并 PR
- 35
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/paimon-cpp 的其他 Issue
-
[Feature] Support File Index V2 and streaming index writes可能已有人在做 @zjw1111 于 1 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 25/100
apache/paimon-cpp#445 ·
维护者通常 3 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
apache/paimon-cpp#410 ·
维护者通常 3 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
apache/paimon-cpp#409 ·
维护者通常 3 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
apache/paimon-cpp#408 ·
维护者通常 3 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
apache/paimon-cpp#407 ·
维护者通常 3 天内回复
查看 apache/paimon-cpp 的全部 Issue
相似的 Issue
-
v9.6.0: CMake incorrectly enforces presence of libevdev可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
mltframework/shotcut#1943 ·
维护者通常 1 天内回复
-
Rowan (2017) electron heating gives NaN for beta > beta_max; clip() then sets electrons to kel_min未关闭
难度 2/5 1-3 小时 新手友好度 72/100
parthenon-hpc-lab/kharma#213 · 1 条评论 ·
维护者通常 3 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
metasequoiaime/msime#9113 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
tone-3000/tone3000-plugin#257 · 1 条评论 ·
维护者通常 1 天内回复