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

Retry failed requests in benchmark #3119

Merged
merged 1 commit into from
Jul 12, 2022
Merged

Retry failed requests in benchmark #3119

merged 1 commit into from
Jul 12, 2022

Conversation

sadhansood
Copy link
Contributor

We can retry the failed requests and expect to get effects from the transaction digest if the previous one went through or submit a new one again

@sadhansood sadhansood marked this pull request as ready for review July 9, 2022 02:01
@sadhansood sadhansood requested a review from mystenmark July 11, 2022 16:37
Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

Thanks! Made a few comments, mostly stylistic.

// TODO (GAS-LEAK): How do we add this gas back in the pool?
NextOp::Response(None)
// eprintln!("{}", sui_err);
NextOp::Retry(Box::new((tx, counter_id, owner)))
}
_ => {
// eprintln!("error");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd nix those prints or make the logs while we're at it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -236,7 +237,7 @@ async fn main() {
make_counter_increment_transaction(gas.1 .0, package_ref, counter_id);
let res = qd
.execute_transaction(ExecuteTransactionRequest {
transaction: tx,
transaction: tx.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary?

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, because we are moving the tx object later on

Comment on lines 288 to 295
Err(_sui_err) => {
//eprintln!("{}", _sui_err);
NextOp::Retry(b)
}
_ => {
// eprintln!("error");
NextOp::Retry(b)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Those can probably de made more compact.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hopefully addresses

.map(move |res| {
match res {
Ok(ExecuteTransactionResponse::EffectsCert(result)) => {
let (_, effects) = *result;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can put this destructuring pattern in the line right above.

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 tried, but looks like i cannot destruct the Box<> inside the EffectsCert

@sadhansood sadhansood force-pushed the sadhan/benchmark branch 3 times, most recently from e8367e1 to 7dc85db Compare July 12, 2022 17:13
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.

2 participants