-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(torture): unify exec commit and commit crash #790
feat(torture): unify exec commit and commit crash #790
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
torture/src/supervisor/workload.rs
Outdated
|
||
// Sample the agent to make sure the changeset was correctly applied or reverted. | ||
let agent_sync_seqn = rr.send_query_sync_seqn().await?; | ||
if snapshot.sync_seqn != agent_sync_seqn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❗️
Shouldn't we expect, for example, that if the commit succeeded then the sync_seqn should actually be equal to snapshot.sync_seqn
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we expected that. The current if-else statement doesn't properly cover all expected and unexpected cases. Now that you've let me think more about that, I will update it with:
// Sample the agent to make sure the changeset was correctly applied or reverted.
let agent_sync_seqn = rr.send_query_sync_seqn().await?;
if snapshot.sync_seqn == agent_sync_seqn {
// The changeset is expected to be applied, the commit succeeded.
self.ensure_changeset_applied(&rr, &changeset).await?;
self.state.commit(snapshot);
} else if self.state.committed.sync_seqn == agent_sync_seqn {
// The changeset is expected to be reverted, the commit crashed.
self.ensure_changeset_reverted(&rr, &changeset).await?;
} else {
return Err(anyhow::anyhow!("Unexpected agent sync_seqn"));
}
560fe73
to
f0059bf
Compare
The unification of the two has the side effect of handling ENOSPC errors also for commits that are expected to crash.
f0059bf
to
5ac99ba
Compare
The unification of the two has the side effect of handling
ENOSPC errors also for commits that are expected to crash.