-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[Consensus] Garbage Collection - 2 #19385
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
84fbbcf
to
7e3dd2f
Compare
let blocks_to_accept = self | ||
.verify_block_timestamps_and_accept(iter::once(block).chain(unsuspended_blocks)); |
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.
Practically most of the previous code has been extracted to the verify_block_timestamps_and_accept
method. This won't be needed once we refactor to the new timestamp approach
@@ -114,69 +114,15 @@ impl BlockManager { | |||
missing_blocks.extend(ancestors_to_fetch); | |||
continue; | |||
} | |||
TryAcceptResult::Processed => continue, | |||
TryAcceptResult::Processed | TryAcceptResult::Skipped => continue, |
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've made the decision to let received blocks with block.round <= gc_round
to be allowed received up to here and not straight rejected on the AuthorityService
mostly for two reasons:
- round_prober: this is using the highest_received_rounds keeps getting updated on the received blocks. Dropping blocks early enough due to gc (ex let's assume that we indeed have a slow proposer
A
, or there was some temporary network issue) , will not update those structs and might effectively make the proposerA
halt on propose and not be able to recover from that as received blocks will keep getting rejected. - metrics in block manager that are updated per received block. That's useful insight to have and we might don't want to lose at this point.
Another point to keep in mind, it's the amnesia recovery. Since now we'll not store blocks < gc_round we might have a case of a node whose blocks get rejected , and then tries to recover from a db wipe out. Since none of the earlier blocks would have been stored the node will try to propose from much earlier. That's quite nit and I wouldn't worry now. Just adding this here to keep in mind to show all the affected paths from this decision.
0d782f5
to
0f3aa12
Compare
…d and last committed leader slot
…sitive setting. It also configures whether the feature is enabled or not
0f3aa12
to
8c6b286
Compare
7706a83
to
8cdf3ba
Compare
Description
This is the second part of Garbage Collection which implements the following ticked next steps as outlined on the previous PR
gc_round
whenlast_fetched_round < gc_round
for a peer to prevent us from fetching unnecessary blocksNext steps:
Test plan
CI/PT
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.