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 25 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. |
bitflicker64
left a comment
There was a problem hiding this comment.
R1 inline item. The summary follows in the conversation.
Review summary, R1 (FULL)
Verdict: four reviewers found no confirmed defect introduced by this PR. One minor item is still uncertain. The PR is not ready to merge alongside #31 as-is (see below).
Uncertain: Removed deductions (Reviewer B):
Docs note (unscored): the compatibility section mentions only the Removed deductions (Reviewer D):
Overlap with #31: both PRs share the same core semantics: cycle length counts actual vertices, the vertex with the smallest external ID owns each cycle, and boolean mode checks each vertex. They differ in neighbor ordering, which can change which cycles are kept when the limit truncates, and in validation and output type. A trial merge conflicts in Checks: targeted |
Rebase the iterative bounded-cycle implementation onto the current master and retain the defensive regression cases from the alternative recursive fix.
2f99cf3 to
ba66289
Compare
最终复审结论(head
|
背景
cycle_detection在 Hubble 上容易长时间运行甚至超时。除“枚举全部简单环本身可能指数增长”这一算法边界外,旧实现还存在确定性的正确性与实现开销:min_length/max_length按旧 stack 形态存在一位偏差;boolean实际写回整数,却声明为TEXT;Before → After
核心设计
正确性
min_length=0归一化为 2;limit > 0与compute.max_step >= 2;all/limit仍由外部字符串 ID 最小的顶点负责输出,保持既有去重与输出形状;boolean对环上每个顶点独立判断,并在首个合法环处停止;Int64aggregate;boolean输出类型修正为 HugeGraphINT,列表模式保持TEXT;性能与内存
compute.parallel分区只创建一套可复用visited/path/frames;all/limit搜索热路径只比较uint32rank,不再反复比较字符串;[]string头数组:排序阶段仅保留 4 B/vertex 临时顺序和 4 B/vertex rank;boolean完全跳过 rank 数组与O(V log V)排序。与 #31 的取舍
已逐项比较 #31 的实现与测试。#33 覆盖其实际环长、参数校验、canonical root、boolean 输出类型和 Int64 计数语义,并额外提供迭代 DFS、分区级状态复用、boolean 跳过全图排序、邻接去重与零字节 scatter。
#31 独有的防御性场景已纳入当前分支:
cycle.min_length;#31 已在完成对比、测试迁移和当前 head 全绿后关闭;#33 为唯一保留方案。
复杂度边界
all模式必须物化全部符合条件的简单环,结果数量在稠密图上可能指数增长,任何精确实现都不能保证固定运行时间。本 PR 消除实现层面的递归、重复分配、字符串热路径与无效通信,但不把全量枚举描述为有界任务。生产/Hubble 场景应优先使用:
boolean:只判断顶点是否位于任意环中;limit:限制每个 canonical root 的最大输出环数;cycle.max_length。兼容性边界
boolean输出 schema 从 HugeGraphTEXT修正为INT。若目标图已有同名TEXTPropertyKey,需要新建INTPropertyKey 或完成 schema 迁移。cycle.max_length现在严格表示环中的实际顶点数;依赖旧错误边界的任务结果会发生预期变化。回归覆盖
boolean覆盖环上每个顶点、首环短路、无需 rank;limit=1及 early-return 后 search state 复用;变更规模
master;验证
当前 head:
0c13afbORG exact-head checks 全部通过:
Vermeer CIrun 89:success;CodeQLrun 108:success;license checkerrun 135:success。ORG review threads 已全部处理并 resolve。
ASF apache#380 使用同一 head;其 Vermeer CI 71 / CodeQL 862 / license checker 525 当前仍在 ASF 队列中,不把 ORG 绿灯替代为 ASF 结论。
ASF upstream: apache#380