Skip to content

Feature (Light Edges / 1) - refactor(storage): thread EdgeRef through edge-type-index abort path#4207

Draft
andrejtonev wants to merge 1 commit into
masterfrom
light_edges-01-edgeref-abortprocessor
Draft

Feature (Light Edges / 1) - refactor(storage): thread EdgeRef through edge-type-index abort path#4207
andrejtonev wants to merge 1 commit into
masterfrom
light_edges-01-edgeref-abortprocessor

Conversation

@andrejtonev
Copy link
Copy Markdown
Contributor

The edge-type-index abort path collected raw Edge* for cleanup. Threading EdgeRef instead lets the same abort machinery describe both heavy (skiplist-resident) and light (pool-allocated) edges by gid-or-pointer, which a later light-edge PR requires. In isolation this is behaviour-preserving: the abort collection is a std::vector iterated linearly, never sorted or keyed on EdgeRef, so EdgeRef's gid-based comparators are never exercised; every EdgeRef originates from an Edge* so .ptr is the active union member end-to-end, and the index consumer extracts .edge = edge.ptr exactly as before.

The edge-type-index abort path collected raw Edge* for cleanup. Threading
EdgeRef instead lets the same abort machinery describe both heavy
(skiplist-resident) and light (pool-allocated) edges by gid-or-pointer, which a
later light-edge PR requires. In isolation this is behaviour-preserving: the
abort collection is a std::vector iterated linearly, never sorted or keyed on
EdgeRef, so EdgeRef's gid-based comparators are never exercised; every EdgeRef
originates from an Edge* so .ptr is the active union member end-to-end, and the
index consumer extracts .edge = edge.ptr exactly as before. The two caller
sites (InMemoryStorage detach-delete producer and
InMemoryEdgeTypeIndex::AbortEntries consumer) are updated in the same commit
because EdgeRef's constructor and Entry::edge are both non-implicit, so the
change does not compile piecemeal.
@andrejtonev andrejtonev added this to the mg-v3.11.0 milestone May 29, 2026
@andrejtonev andrejtonev requested a review from as51340 May 29, 2026 09:24
@andrejtonev andrejtonev self-assigned this May 29, 2026
@andrejtonev andrejtonev added feature feature Docs unnecessary Docs unnecessary CI -build=community -test=core Run community build and core tests on push CI -build=coverage -test=core Run coverage build and core tests on push CI -build=debug -test=core Run debug build and core tests on push CI -build=debug -test=integration Run debug build and integration tests on push CI -build=release -test=e2e Run release build and e2e tests on push CI -build=release -test=stress Run release build and stress tests on push CI -build=release -test=benchmark Run release build and benchmark on push CI -build=release -test=query_modules Run release build and query modules tests on push CI -build=malloc -test=build Run malloc build on push CI -build=coverage -test=clang_tidy CI -build=mage -test=amd labels May 29, 2026
@andrejtonev
Copy link
Copy Markdown
Contributor Author

Git commit description, explain the changes you made here


Leave above in PR description, copy the below into a comment


Tracking

  • [Link to Epic/Issue]

Standard development

CI Testing Labels

  • Select the appropriate CI test labels (CI -build=build-name -test=test-suite)

Documentation checklist

  • Add the documentation label
  • Add the bug / feature label
  • Add the milestone for which this feature is intended
    • If not known, set for a later milestone
  • Write a release note, including added/changed clauses
    • What has changed? What does it mean for a user? What should a user do with it? [#{{PR_number}}]({{link to the PR}})
  • [ Documentation PR link memgraph/documentation#XXXX ]
    • Is back linked to this development PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI -build=community -test=core Run community build and core tests on push CI -build=coverage -test=clang_tidy CI -build=coverage -test=core Run coverage build and core tests on push CI -build=debug -test=core Run debug build and core tests on push CI -build=debug -test=integration Run debug build and integration tests on push CI -build=mage -test=amd CI -build=malloc -test=build Run malloc build on push CI -build=release -test=benchmark Run release build and benchmark on push CI -build=release -test=e2e Run release build and e2e tests on push CI -build=release -test=query_modules Run release build and query modules tests on push CI -build=release -test=stress Run release build and stress tests on push Docs unnecessary Docs unnecessary feature feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant