-
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
Checkpoint integration test #2343
Conversation
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.
Ok, we are really close now -- nice work. Now we can test end-to-end!
@@ -147,6 +154,7 @@ impl AuthorityServer { | |||
pub struct ValidatorService { | |||
state: Arc<AuthorityState>, | |||
consensus_adapter: ConsensusAdapter, | |||
_checkpoint_consensus_handle: Option<JoinHandle<()>>, |
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.
Hm, this is not going to be so simple, since we will need to restart it upon reconfiguration? We will work out the right structure down the line.
@@ -295,7 +302,7 @@ pub struct CheckpointConsensusAdapter { | |||
/// Receive new checkpoint fragments to sequence. | |||
rx_checkpoint_consensus_adapter: Receiver<CheckpointFragment>, | |||
/// A pointer to the checkpoints local store. | |||
checkpoint_locals: ArcSwapOption<CheckpointLocals>, | |||
checkpoint_locals: Arc<CheckpointLocals>, |
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.
Thank you for this! Indeed we do not need a swap here.
pub fn spawn(mut instance: Self) -> JoinHandle<()> { | ||
tokio::spawn(async move { instance.run().await }) | ||
pub fn spawn(mut self) -> JoinHandle<()> { | ||
tokio::spawn(async move { self.run().await }) |
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.
We will have to track its lifetime and restart/halt propertly.
checkpoint-consensus integration test
Test the integration of the checkpointing logic with consensus.