Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
已完成与 #33 的逐文件、语义和测试对比,保留 #33 作为主方案:
因此关闭本 PR 以减少两套实现并行审查;没有丢失独有测试或有效语义。 |
背景
cycle_detection当前在 Hubble/Vermeer 上容易出现长时间运行,且存在确定性正确性问题:len(stack),但 stack 不包含 root,导致三角环按长度 2 判断,min_length=3时会漏掉合法 3 环;cycle.max_length、min_length、max_cycles缺少边界校验;uint8,但属性类型声明为TEXT;int32,大结果存在溢出风险。方案
searchBoundedCycles(),用单个 visited set 原地 push/pop;all模式保持不限数量,limit严格按max_cycles停止,boolean首个合法环立即停止;INT,cycle 总数升级为int64。测试
新增覆盖:
min_length=max_length=3下可被识别;max_length=2;范围
性能边界
这次消除了递归层级重复 map 分配,并修复有界搜索语义。
all模式在稠密图上枚举全部简单环仍可能指数增长,这是输出规模本身决定的;生产环境需要受控结果时应使用limit或boolean。ASF 上游 PR 会使用同一 head 分支同步提交。
ASF upstream: apache#378