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

Add smoke tests for the Raft bassed metadata cluster #2582

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

tillrohrmann
Copy link
Contributor

This PR is based on #2572 and #2581.

Copy link
Contributor

@pcholakov pcholakov left a comment

Choose a reason for hiding this comment

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

Love the chaos test, great stuff!

Comment on lines 79 to 84
let failed_precondition = client
.put(
key.clone(),
&new_value,
Precondition::MatchesVersion(value_version.next()),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is perfect for a smoke test but if you wanted to, you could also add a Precondition::DoesNotExist attempt. Maybe it just makes the test extra verbose though, not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Will add it as well.


let start_chaos = Instant::now();

let chaos_handle = TaskCenter::spawn_unmanaged(TaskKind::Background, "chaos", async move {
Copy link
Contributor

Choose a reason for hiding this comment

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

If only getting a handle on chaos was this easy in real life :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would make for an awesome business ;-)

@tillrohrmann tillrohrmann force-pushed the raft-smoke-test branch 2 times, most recently from b8a4fe0 to 9446ad4 Compare January 30, 2025 13:43
Before, we stopped joining the cluster if were a member and had an ongoing join
operation in flight. This was clearly wrong. This is no changed to only stop
joining if one is no longer a member.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Metadata might lag a little bit behind what the KvMemoryStorage already knows.
That's why the RaftMetadataStore now uses which ever NodesConfiguration is newer.
@tillrohrmann tillrohrmann merged commit 5e7d08f into restatedev:main Jan 31, 2025
24 checks passed
@tillrohrmann tillrohrmann deleted the raft-smoke-test branch January 31, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants