Skip to content

Feature (Light Edges / 2) - refactor(storage): carry Edge* in deleted_edges_ instead of Gid#4209

Draft
andrejtonev wants to merge 1 commit into
light_edges-01-edgeref-abortprocessorfrom
light_edges-02-deleted-edges-ptr
Draft

Feature (Light Edges / 2) - refactor(storage): carry Edge* in deleted_edges_ instead of Gid#4209
andrejtonev wants to merge 1 commit into
light_edges-01-edgeref-abortprocessorfrom
light_edges-02-deleted-edges-ptr

Conversation

@andrejtonev
Copy link
Copy Markdown
Contributor

GC already holds the Edge* during the delta walk; recording the Gid and re-find()-ing the pointer at removal time is redundant. Carry the Edge* through the deleted-edge working set (deleted_edges_, current_deleted_edges, my_deleted_edges) and drop the find() round-trip in the vector-edge-index cleanup. EdgeMetadataIndex still keys on Gid, so its OnEdgesDeleted call sites project via views::transform(&Edge::gid). Master's metadata -> vertices -> edges removal ordering and the MG_ASSERT(edge_acc.remove(...)) invariant are preserved.

Heavy-mode behaviour-preserving; introduces no light-edge logic.

GC already holds the Edge* during the delta walk; recording the Gid and
re-find()-ing the pointer at removal time is redundant. Carry the Edge*
through the deleted-edge working set (deleted_edges_, current_deleted_edges,
my_deleted_edges) and drop the find() round-trip in the vector-edge-index
cleanup. EdgeMetadataIndex still keys on Gid, so its OnEdgesDeleted call
sites project via views::transform(&Edge::gid). Master's
metadata -> vertices -> edges removal ordering and the
MG_ASSERT(edge_acc.remove(...)) invariant are preserved.

Heavy-mode behaviour-preserving; introduces no light-edge logic.
@andrejtonev andrejtonev added this to the mg-v3.11.0 milestone May 29, 2026
@andrejtonev andrejtonev requested a review from as51340 May 29, 2026 13:05
@andrejtonev andrejtonev self-assigned this May 29, 2026
@andrejtonev andrejtonev added bug bug feature feature 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=jepsen -test=core Run jepsen 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 CI -build=mgcxx -test=unit 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

@sonarqubecloud
Copy link
Copy Markdown

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

Labels

bug bug 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=jepsen -test=core Run jepsen build and core tests on push CI -build=mage -test=amd CI -build=malloc -test=build Run malloc build on push CI -build=mgcxx -test=unit 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 feature feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant