Skip to content

Bugfix: Unreleased deltas when using HA#2976

Merged
as51340 merged 6 commits intomasterfrom
fix-replication-memory-leak
May 22, 2025
Merged

Bugfix: Unreleased deltas when using HA#2976
as51340 merged 6 commits intomasterfrom
fix-replication-memory-leak

Conversation

@as51340
Copy link
Contributor

@as51340 as51340 commented May 15, 2025

When an instance becomes MAIN, RECOVER SNAPSHOT query is used or SnapshotRpc is received, IDs in range [old_storage_timestamp, ldt] are marked as finished in the commit log.

@as51340 as51340 added this to the mg-v3.3.0 milestone May 15, 2025
@as51340 as51340 requested review from Ignition and andrejtonev May 15, 2025 12:18
@as51340 as51340 self-assigned this May 15, 2025
@as51340 as51340 added bug bug Docs - changelog only Docs - changelog only CI -build=release -test=core Run release build and core tests on push CI -build=release -test=e2e Run release build and e2e tests on push labels May 15, 2025
@as51340
Copy link
Contributor Author

as51340 commented May 15, 2025

Tracking

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
    • When an instance becomes main, it marks a range of transactions with IDs smaller than global timestamp used in replication as finished. This should ensure consistent memory behaviour both on main and replicas. In the same way, transactions will be also marked finished when SnapshotRpc is received or when the RECOVER SNAPSHOT query is used on the standalone Memgraph. #2976
    • 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
  • [ Tag someone from docs team ]

Copy link
Contributor

@Ignition Ignition left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a unit test to tests/unit/commit_log_v2.cpp

@as51340 as51340 requested a review from Ignition May 16, 2025 07:46
@as51340 as51340 requested review from andrejtonev May 19, 2025 13:01
@as51340 as51340 force-pushed the fix-replication-memory-leak branch from aaeaaad to 21114e4 Compare May 20, 2025 05:58
Copy link
Contributor

@andrejtonev andrejtonev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll apply this fix to snapshot in another PR

@as51340 as51340 removed the request for review from Ignition May 21, 2025 21:04
@as51340 as51340 dismissed Ignition’s stale review May 21, 2025 21:05

Andreja already approved it

@as51340 as51340 added this pull request to the merge queue May 21, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 21, 2025
When an instance becomes MAIN, `RECOVER SNAPSHOT` query is used or
`SnapshotRpc` is received, IDs in range [old_storage_timestamp, ldt] are
marked as finished.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 21, 2025
@as51340 as51340 added Capability - high-availability CI -build=coverage -test=core Run coverage build and core tests on push labels May 22, 2025
@as51340 as51340 enabled auto-merge May 22, 2025 07:19
@sonarqubecloud
Copy link

@as51340 as51340 added this pull request to the merge queue May 22, 2025
Merged via the queue into master with commit 33ea21f May 22, 2025
17 checks passed
@as51340 as51340 deleted the fix-replication-memory-leak branch May 22, 2025 09:52
github-merge-queue bot pushed a commit that referenced this pull request May 30, 2025
…3008)

Fixup of the initial effort to fix the issue:
[2976](#2976)
@gitbuda gitbuda mentioned this pull request Jun 3, 2025
16 tasks
as51340 added a commit that referenced this pull request Oct 24, 2025
When an instance becomes MAIN, `RECOVER SNAPSHOT` query is used or
`SnapshotRpc` is received, IDs in range [old_storage_timestamp, ldt] are
marked as finished in the commit log.
as51340 pushed a commit that referenced this pull request Oct 24, 2025
…3008)

Fixup of the initial effort to fix the issue:
[2976](#2976)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug bug Capability - high-availability CI -build=coverage -test=core Run coverage build and core tests on push CI -build=release -test=core Run release build and core tests on push CI -build=release -test=e2e Run release build and e2e tests on push Docs - changelog only Docs - changelog only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants