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

Execute sequenced certs serially in execution driver #5788

Merged
merged 4 commits into from
Nov 3, 2022

Conversation

mystenmark
Copy link
Contributor

Temporary work around (until the scheduler is finished) for degenerate behavior when there are many pending certs on the same object.

@mystenmark mystenmark requested a review from lxfind November 2, 2022 17:03
@@ -1622,11 +1626,24 @@ impl AuthorityState {
&self,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: rename this function to add_pending_certificates_from_gossip? Not sure where else this is called.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is called in authority_server as well - if we can't execute a cert received via handle_certificate, we enqueue it there for causal completion.

Copy link
Contributor

Choose a reason for hiding this comment

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

Btw, why did we have to enqueue the failed certificate in authority server? Just to avoid lagging behind?

@@ -112,31 +113,67 @@ where
true
}
})
.collect();
.partition(|(_, (is_sequenced, _))| *is_sequenced);

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a debug logging here to print the number on each side of the partition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea

.into_iter()
.filter(|(idx, digest)| {
.filter(|(idx, (_, digest))| {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think here we need to favor digests that are sequenced, if there is duplicate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct, we first serially execute all sequenced digests.

@mystenmark mystenmark requested a review from lxfind November 3, 2022 11:22
@mystenmark mystenmark force-pushed the mlogan-dumb-scheduler branch from 66b0562 to 387c421 Compare November 3, 2022 13:22
@mystenmark mystenmark force-pushed the mlogan-dumb-scheduler branch from 387c421 to c5b6c51 Compare November 3, 2022 15:42
@mystenmark mystenmark enabled auto-merge (squash) November 3, 2022 15:42
@mystenmark mystenmark merged commit 264bc42 into main Nov 3, 2022
@mystenmark mystenmark deleted the mlogan-dumb-scheduler branch November 3, 2022 15:56
Jordan-Mysten pushed a commit to Jordan-Mysten/sui that referenced this pull request Nov 4, 2022
* Execute sequenced certs serially in execution driver

* Just use a bool to indicate whether sequenced

* PR comments

* Prioritize sequenced over unsequenced when there are duplicates
ebmifa pushed a commit that referenced this pull request Nov 4, 2022
* Execute sequenced certs serially in execution driver

* Just use a bool to indicate whether sequenced

* PR comments

* Prioritize sequenced over unsequenced when there are duplicates
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