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

[Bifrost] Bifrost appends will wait for reconfiguration #1772

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Jul 30, 2024

[Bifrost] Bifrost appends will wait for reconfiguration

Bifrost appends will wait for reconfiguration to complete. Additionally, log metadata will now handle empty segments correctly. An empty segment will be removed from the chain and replaced with the newly created one but with a higher segment index.


Stack created with Sapling. Best reviewed with ReviewStack.

Copy link

github-actions bot commented Jul 30, 2024

Test Results

102 files  ±0  102 suites  ±0   23m 1s ⏱️ +34s
 84 tests ±0   84 ✅ ±0  0 💤 ±0  0 ❌ ±0 
217 runs  ±0  217 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a8f4928. ± Comparison against base commit 5f36dcb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Really good work @AhmedSoliman :-) LGTM. +1 for merging.

let start = Instant::now();
for sleep_dur in retry_iter.by_ref() {
self.fail_if_shutting_down()?;
tokio::time::sleep(sleep_dur).await;
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 also wait for a logs metadata update to occur?

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 attempted to do that but it ended up being quite tricky and prone to racy select(). I'm leaning towards leaving it as is to avoid complexity until we find a good reason to avoid the short sleep.

crates/types/src/config/bifrost.rs Outdated Show resolved Hide resolved
crates/types/src/config/bifrost.rs Outdated Show resolved Hide resolved
crates/types/src/config/bifrost.rs Outdated Show resolved Hide resolved
Bifrost appends will wait for reconfiguration to complete. Additionally, log metadata will now handle empty segments correctly. An empty segment will be removed from the chain and replaced with the newly created one but with a higher segment index.
@AhmedSoliman AhmedSoliman merged commit 34b30e1 into main Jul 31, 2024
8 checks passed
@AhmedSoliman AhmedSoliman deleted the pr1772 branch July 31, 2024 16:40
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