-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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] Make CommitRange inclusive and use in commit syncer #17788
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
timeout: Duration, | ||
) -> ConsensusResult<(Vec<Bytes>, Vec<Bytes>)> { | ||
let mut client = self.get_client(peer, timeout).await?; | ||
let mut request = Request::new(FetchCommitsRequest { start, end }); | ||
let mut request = Request::new(FetchCommitsRequest { |
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.
note: decided against using CommitRange
in FetchCommitsRequest
so we could keep the types of the message as u32
which should be more efficient.
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.
Yes that would be a backward incompatible change.
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.
oh right! That should have been the main reason not to do it 😆
86a87dd
to
57d0bf7
Compare
48addda
to
a0c7e40
Compare
#[derive(Clone, Default, Debug, PartialEq, Eq, Serialize, Deserialize)] | ||
pub(crate) struct CommitRange(Range<CommitIndex>); | ||
/// and end (inclusive) commit indices and can be ordered for use as the key of a table. | ||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] |
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.
Copy
can be derived as well, so we don't need to explicitly clone()
CommitRange.
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.
Unfortunately RangeInclusive
does not impl Copy
Update authority_service.rs Update authority_service.rs
cf0dc41
to
7c28447
Compare
…enLabs#17788) ## Test plan pending ptn run
Test plan
pending ptn run