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

Causal replay #156

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Causal replay #156

merged 1 commit into from
Aug 15, 2024

Conversation

Aurel300
Copy link
Contributor

@Aurel300 Aurel300 commented Aug 9, 2024

An attempt to add causal dependency to the replay scheduler. To use this, set_target_clock should be invoked on a ReplayScheduler instance with the clock of the failure event (provided as a slice of integers). Some things to resolve still:

  • To make this work, schedulers now receive references to Tasks rather than just TaskIds. I think we discussed that schedulers should generally have access to more information about tasks, so if this is the approach we take, the Task interface might deserve some more cleanup. Even more so if schedulers are eventually intended to be defined in a separate crate.
  • (minor) Any RNG steps in a schedule following a skipped task should also be scheduled. Need to add a test for this and implement.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Aurel300 Aurel300 force-pushed the feature/causal-replay branch from 118759d to f6ba23b Compare August 12, 2024 19:08
@Aurel300 Aurel300 marked this pull request as ready for review August 12, 2024 19:08
src/scheduler/replay.rs Outdated Show resolved Hide resolved
src/scheduler/replay.rs Show resolved Hide resolved
@Aurel300 Aurel300 force-pushed the feature/causal-replay branch from f6ba23b to a63bbdf Compare August 13, 2024 17:52
src/scheduler/replay.rs Outdated Show resolved Hide resolved
tests/basic/replay.rs Show resolved Hide resolved
})
.expect_err("test should panic");
let output = result.downcast::<&str>().unwrap();
assert_eq!(*output, "expected panic");
Copy link
Member

Choose a reason for hiding this comment

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

Could you also add an assert about steps_skipped to test that functionality too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how to do this (easily): Runner::new takes the scheduler we construct, so there is no access to it afterwards.

Copy link
Member

Choose a reason for hiding this comment

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

Okay for now. Maybe we can find a way to get additional metrics through the metrics scheduler

})
.expect_err("test should panic");
let output = result.downcast::<&str>().unwrap();
assert_eq!(*output, "expected panic");
Copy link
Member

Choose a reason for hiding this comment

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

Similar comments here: add assertions for me() and steps_skipped

@Aurel300 Aurel300 force-pushed the feature/causal-replay branch from a63bbdf to 83cdcef Compare August 14, 2024 19:02
jorajeev
jorajeev previously approved these changes Aug 14, 2024
@jorajeev jorajeev enabled auto-merge (squash) August 14, 2024 19:58
auto-merge was automatically disabled August 14, 2024 22:04

Head branch was pushed to by a user without write access

@Aurel300 Aurel300 force-pushed the feature/causal-replay branch from 83cdcef to 188de43 Compare August 14, 2024 22:04
@sarsko sarsko enabled auto-merge (squash) August 14, 2024 22:20
@sarsko sarsko merged commit 1b83637 into awslabs:main Aug 15, 2024
10 checks passed
@Aurel300 Aurel300 deleted the feature/causal-replay branch August 15, 2024 00:53
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.

3 participants