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

fix: adjust rollback_start_live update #811

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nomt/src/rollback/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ impl Rollback {

// NOTE: for now, if there is a pending truncate, we ignore everything else.
if let Some(pending_truncate) = pending_truncate {
let rollback_start_live = std::cmp::min(seglog.live_range().0 .0, pending_truncate);
Copy link
Contributor

Choose a reason for hiding this comment

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

the formatting here is a bit odd (same as before), but should be

seglog.live_range().0.0 without the extra space.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! I agree that formatting is weird, but it seems it is what the latest version of rustfmt wants. I disabled it and pushed without the extra space

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently this is not considered acceptable by rustfmt at all, as you can see in this action failure.

I will keep the weird extra space, otherwise we should use something like #[rustfmt::skip] but I don't think it is worth it!

return WriteoutData {
rollback_start_live: seglog.live_range().0 .0,
rollback_start_live,
rollback_end_live: pending_truncate,
prune_to_new_start_live: None,
prune_to_new_end_live: Some(pending_truncate),
Expand Down
2 changes: 1 addition & 1 deletion torture/src/supervisor/workload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ impl Workload {
assert!(matches!(outcome, OpenOutcome::Success));
}
OpenOutcome::UnknownFailure(err) => {
panic!("unexpected open outcome: {:?}", err);
return Err(anyhow::anyhow!("unexpected open outcome: {:?}", err));
}
}

Expand Down