Skip to content

fix(server): respect the limit for customized crosspoints - #3472

Merged
imbajin merged 2 commits into
apache:masterfrom
hugegraph:codex/fix-customized-crosspoints-limit-20261108
Nov 8, 2026
Merged

imbajin merged 2 commits into
apache:masterfrom
hugegraph:codex/fix-customized-crosspoints-limit-20261108

Conversation

@imbajin

@imbajin imbajin commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Mirrors hugegraph/hugegraph#371 from the existing source branch. Verification details below are reported by the source PR; See this pull request’s checks for the current ASF CI status.

修改示意

server371 ## 问题

自定义交叉点查询超过 limit 时,原实现截取 size - 1,可能返回多于用户要求的交叉点。单源存在多条路径到达同一终点时,重复终点也会占用限额。

修改

  • 先对交叉点去重,再按 limit 截取,并保留入选交叉点对应的全部路径。
  • 单源场景保留终点首次出现的顺序;多源交集沿用原有集合语义。
  • 增加 API 回归测试,覆盖重复路径和不同限额。

验证情况

  • 将原实现和候选实现的交叉点方法提取到 Java 21 测试程序,使用最小类型桩验证单源重复路径、limit 为 1、2、3、4、-1,以及双源场景:原实现的 limit=1 返回两个交叉点,候选实现通过检查。此结果不代表完整项目或真实服务端测试通过。
  • 新增 API 回归测试已注册于现有测试套件,但尚未编译或运行。当前执行环境无法通过 Git 获取完整仓库。
  • 当前提交尚未完成 Server、PD/Store CI 或真实服务端验证;大规模查询性能也尚未实测。

@codecov

codecov Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.25%. Comparing base (8e327b8) to head (8e7a271).
⚠️ Report is 19 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3472      +/-   ##
============================================
- Coverage     58.42%   58.25%   -0.17%     
- Complexity     6903     7234     +331     
============================================
  Files           779      779              
  Lines         69391    69961     +570     
  Branches       9567     9744     +177     
============================================
+ Hits          40539    40759     +220     
- Misses        25179    25507     +328     
- Partials       3673     3695      +22     
Flag Coverage Δ *Carryforward flag
commons 96.37% <ø> (ø) Carriedforward from 8e327b8
hstore 36.07% <ø> (-0.01%) ⬇️ Carriedforward from 8e327b8
pd 56.75% <ø> (+<0.01%) ⬆️ Carriedforward from 8e327b8
server_hbase 42.61% <ø> (+0.03%) ⬆️ Carriedforward from 8e327b8
server_memory 56.67% <100.00%> (+0.15%) ⬆️
server_rocksdb 42.99% <100.00%> (-0.05%) ⬇️
store 35.96% <ø> (-0.01%) ⬇️ Carriedforward from 8e327b8

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imbajin
imbajin merged commit 0abd931 into apache:master Nov 8, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants