-
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): add rollback #706
Conversation
42a45c2
to
76830d5
Compare
0e1eb30
to
6f652f9
Compare
76830d5
to
1f3d3dd
Compare
6f652f9
to
c6e9776
Compare
1f3d3dd
to
3d2e541
Compare
c6e9776
to
6531ee1
Compare
3d2e541
to
2ab0811
Compare
#[clap(default_value = "5")] | ||
#[clap(value_parser=clap::value_parser!(u8).range(0..=100))] | ||
#[arg(long = "workload-rollback")] | ||
pub rollback: u8, |
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.
I had this comment when I was reviewing the crash PR, but leaving it here
I don't find this interface intuitive.
When I have the operations: commit, crash, rollback, then setting the rollback 20 and the crash 30 as a user I expect that for each 10 iterations I will have 5 normal commits, 3 crashing commits and 2 rollbacks.
However, the way you choose whether or not to execute is not independent. IOW,
p(crash) ≠ biases.crash,
but rather
p(crash) = (1 - biases.rollback) * biases.crash
As you can see this also depends on the order of the checks in code. So if we add another check it will gain the dependence on the previous checks.
I think this is fine for now and I don't have an idea how to fix this immediatelly. Also biases are kind of inherently dependent.
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.
I don't find this interface intuitive.
fair, for sure it can be improved.
p(crash) = (1 - biases.rollback) * biases.crash
That's totally true. I agree that this is not nice.
I will try to implement what you just described in a follow up pr!
6531ee1
to
9b29ab0
Compare
2ab0811
to
a29e202
Compare
9b29ab0
to
42b968b
Compare
8a12a5f
to
271ed0f
Compare
a526f84
to
63728ca
Compare
271ed0f
to
c2a12a6
Compare
async fn spawn_new_agent(&mut self) -> anyhow::Result<()> { | ||
assert!(self.agent.is_none()); | ||
controller::spawn_agent_into(&mut self.agent).await?; | ||
let workdir = self.workdir.path().display().to_string(); | ||
let rollback = self.state.biases.rollback > 0.0; |
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.
FWIW, this is fine for now, but in the future we want some workloads to be running with rollback enabled and some with rollback disabled.
c2a12a6
to
ac549d4
Compare
No description provided.