Duplicate vertex ids when adding high number of vertices
还没有人认领这个 Issue。
评估
调研方向
首先使用 Graph.add_vertices(Graph.new, 0..250000) 重现示例,并检查 Graph.Utils.vertex_id/1,尤其是其对 :erlang.phash2 的使用。确认重复的顶点 ID 如何影响插入。完成的标准是,添加示例范围后仍保留全部 250001 个顶点,且没有重复键。
由索引模型根据 Issue 内容生成。
描述
When adding large number of vertices, some of my vertices weren't added to the graph.
For example
vertices = 0..250000 |> Enum.map(& &1)
Graph.add_vertices(Graph.new, vertices)
#Graph<type: directed, num_vertices: 249997, num_edges: 0>
I fixed it for myself by changing the function Graph.Utils.vertex_id(v) to
def vertex_id(v), do: v
instead of
def vertex_id(v), do: :erlang.phash2(v, @max_phash)
Apparently I had duplicate key in my graph otherwise.
- 主要语言
- Elixir
- 星标
- 571
- 派生
- 76
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bitwalker/libgraph 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
Failing tests未关闭
难度 3/5 1-2 天 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 25/100
查看 bitwalker/libgraph 的全部 Issue
相似的 Issue
-
Cainophile EXIT handler crashes on its own password redaction and logs the DB password in clear text未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
beyond-all-reason/teiserver#1624 ·
维护者通常 1 天内回复
-
enhancement javascript
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
phoenixframework/phoenix_template#15 · 1 条评论 ·
-
GitHub docs are outdated可能已有人在做 @v-robaiken 于 1 天前认领。 未关闭L: javascript T: bug 🐞
难度 2/5 1-3 小时 新手友好度 65/100
dependabot/dependabot-core#16397 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复