Skip to content

Conversation

@as51340
Copy link
Contributor

@as51340 as51340 commented Dec 29, 2025

Protect concurrent demote and write txns during the execution.

@as51340 as51340 added this to the mg-v3.8.0 milestone Dec 29, 2025
@as51340 as51340 self-assigned this Dec 29, 2025
@as51340 as51340 added Capability - high-availability 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=release -test=core Run release build and core tests on push CI -build=release -test=e2e Run release build and e2e tests on push jepsen Bugs found by Jepsen tests CI -build=coverage -test=clang_tidy labels Dec 29, 2025
@sonarqubecloud
Copy link

@as51340 as51340 requested a review from andrejtonev December 29, 2025 10:13
@as51340 as51340 marked this pull request as ready for review December 29, 2025 10:14
@as51340 as51340 added the bug bug label Dec 31, 2025
@as51340
Copy link
Contributor Author

as51340 commented Dec 31, 2025

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
    • If the main received a request for demotion while it was executing a write txn, it could've resulted in an issue if GIDs of the latest txn from the new main overlap with the GIDs from the currently running write txn on the main. Until this PR, concurrent demotion and write txns were running safely concurrently but only if the write txn came to the commit phase. Execution part wasn't protected. In order to demote the instance, we will now wait for all write transactions to finish. Users can now expect smooth demotion of the main instance, even in the case of a long-running write transaction. #3594
    • 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

@as51340 as51340 added this pull request to the merge queue Dec 31, 2025
Merged via the queue into master with commit 07d647a Dec 31, 2025
41 checks passed
@as51340 as51340 deleted the fix/concurrent-demote-txns branch December 31, 2025 10:33
@gitbuda gitbuda mentioned this pull request Jan 31, 2026
25 tasks
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=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=jepsen -test=core Run jepsen 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 jepsen Bugs found by Jepsen tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants