Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose coordinator's internal functionality to manage cluster #1981

Merged
merged 14 commits into from
Apr 30, 2024

Conversation

antoniofilipovic
Copy link
Collaborator

@antoniofilipovic antoniofilipovic commented Apr 25, 2024

Description

This diff adds the option for users to run actions like DEMOTE INSTANCE and FORCE RESET CLUSTER STATE, which are run internally but now open for users to reset cluster state, and choose their instance to be MAIN.

TODO:

  • learn how to trim commits in merge to master, ping @as51340
  • refactor force reset cluster

[master < Task] PR

  • Provide the full content or a guide for the final git message
    • Expose some internal functionality to manage cluster

CI Testing Labels

Please select the appropriate CI test labels (CI -build=build-name -test=test-suite)

Documentation checklist

  • Add the documentation label tag
  • Add the bug / feature label tag
  • 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
    • You can now run demote instance to replica and force reset cluster
  • Link the documentation PR here
    • [Documentation PR link]
  • Tag someone from docs team in the comments

@antoniofilipovic antoniofilipovic self-assigned this Apr 25, 2024
@as51340 as51340 marked this pull request as ready for review April 26, 2024 08:14
@as51340 as51340 marked this pull request as draft April 26, 2024 08:15
@antoniofilipovic antoniofilipovic added feature feature Docs needed Docs needed labels Apr 26, 2024
@antoniofilipovic antoniofilipovic added this to the mg-v2.17.0 milestone Apr 26, 2024
@antoniofilipovic antoniofilipovic changed the title Add user actions for cluster observability Expose some internal functionality to manage cluster Apr 26, 2024
@antoniofilipovic antoniofilipovic added CI -build=release -test=e2e Run release build and e2e tests on push CI -build=release -test=core Run release build and core tests on push CI -build=jepsen -test=core Run jepsen build and core tests on push labels Apr 26, 2024
@antoniofilipovic antoniofilipovic force-pushed the support-user-actions-ha branch 2 times, most recently from d463961 to a8c6a88 Compare April 29, 2024 07:14
@antoniofilipovic antoniofilipovic added CI -build=coverage -test=core Run coverage build and core tests on push and removed 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 labels Apr 29, 2024
@antoniofilipovic antoniofilipovic marked this pull request as ready for review April 29, 2024 15:16
@antoniofilipovic
Copy link
Collaborator Author

@kgolubic will add docs PR soon

Copy link
Contributor

@as51340 as51340 left a comment

Choose a reason for hiding this comment

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

good work, I don't understand some things

src/coordination/coordinator_state.cpp Outdated Show resolved Hide resolved
tests/e2e/high_availability/distributed_coords.py Outdated Show resolved Hide resolved
src/query/interpreter.cpp Show resolved Hide resolved
src/memgraph.cpp Show resolved Hide resolved
src/coordination/coordinator_instance.cpp Outdated Show resolved Hide resolved
src/coordination/coordinator_instance.cpp Show resolved Hide resolved
src/coordination/coordinator_instance.cpp Outdated Show resolved Hide resolved
@as51340
Copy link
Contributor

as51340 commented Apr 30, 2024

Can we name better this PR? "some internal functionality" to something more meaningful

@antoniofilipovic antoniofilipovic changed the title Expose some internal functionality to manage cluster Expose coordinator's internal functionality to manage cluster Apr 30, 2024
Copy link
Contributor

@as51340 as51340 left a comment

Choose a reason for hiding this comment

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

Just change the name of that function, looks good

tests/e2e/mg_utils.py Outdated Show resolved Hide resolved
@antoniofilipovic antoniofilipovic removed CI -build=coverage -test=core Run coverage build and core tests on push CI -build=release -test=e2e Run release build and e2e tests on push labels Apr 30, 2024
Copy link

sonarcloud bot commented Apr 30, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@antoniofilipovic antoniofilipovic added this pull request to the merge queue Apr 30, 2024
Merged via the queue into master with commit b8a4af7 Apr 30, 2024
11 checks passed
@antoniofilipovic antoniofilipovic deleted the support-user-actions-ha branch April 30, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs needed Docs needed feature feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants