-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix(sync): sleep when sync receives None and remove timeout hack #1800
Conversation
bbc8ca1
to
436be8f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1800 +/- ##
==========================================
- Coverage 72.68% 72.12% -0.57%
==========================================
Files 138 139 +1
Lines 19721 19925 +204
Branches 19721 19925 +204
==========================================
+ Hits 14334 14370 +36
- Misses 3230 3396 +166
- Partials 2157 2159 +2 ☔ View full report in Codecov by Sentry. |
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @ShahakShama)
crates/papyrus_p2p_sync/src/lib.rs
line 41 at r1 (raw file):
"wait_period_for_new_data", &self.wait_period_for_new_data.as_secs(), "Time in seconds to wait when a query returned with partial data before sending a \
I liked better the old phrasing. you're not sure it's returned with partial..
crates/papyrus_p2p_sync/src/lib.rs
line 69 at r1 (raw file):
// TODO(shahak): Move this error to network. WrongSignaturesLength { signatures: Vec<BlockSignature> }, #[error("Network returned more responses than expected for a query.")]
add a todo here to remove this error once we can handle it
crates/papyrus_p2p_sync/src/lib.rs
line 111 at r1 (raw file):
loop { if matches!(control, P2PSyncControl::QueryFinishedPartially) { debug!(
I don't think we need this debug.. up to you
crates/papyrus_p2p_sync/src/lib.rs
line 142 at r1 (raw file):
while current_block_number.0 < end_block_number { let maybe_signed_header_stream_result = self.response_receivers.signed_headers_receiver.next().await;
what if it never joins?
436be8f
to
b1f7587
Compare
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @nagmo-starkware)
crates/papyrus_p2p_sync/src/lib.rs
line 41 at r1 (raw file):
Previously, nagmo-starkware wrote…
I liked better the old phrasing. you're not sure it's returned with partial..
I think this relates to the last comment you wrote. If you disagree to what I wrote there let's discuss f2f
crates/papyrus_p2p_sync/src/lib.rs
line 69 at r1 (raw file):
Previously, nagmo-starkware wrote…
add a todo here to remove this error once we can handle it
Done.
crates/papyrus_p2p_sync/src/lib.rs
line 111 at r1 (raw file):
Previously, nagmo-starkware wrote…
I don't think we need this debug.. up to you
I think it's useful
crates/papyrus_p2p_sync/src/lib.rs
line 142 at r1 (raw file):
Previously, nagmo-starkware wrote…
what if it never joins?
Then the sync will be stuck too, and that is the expected behaviour
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.
Reviewed all commit messages.
Reviewable status: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @ShahakShama)
crates/papyrus_p2p_sync/src/lib.rs
line 142 at r1 (raw file):
Previously, ShahakShama wrote…
Then the sync will be stuck too, and that is the expected behaviour
as discessed f2f
b1f7587
to
f59b775
Compare
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.
Reviewed all commit messages.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @ShahakShama)
crates/papyrus_p2p_sync/src/lib.rs
line 28 at r3 (raw file):
pub num_headers_per_query: usize, #[serde(deserialize_with = "deserialize_seconds_to_duration")] pub wait_period_for_new_data: Duration,
maybe rename to retry_sleep_duration
or something like that?
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.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @ShahakShama)
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.
Reviewable status: 3 of 4 files reviewed, all discussions resolved (waiting on @nagmo-starkware)
crates/papyrus_p2p_sync/src/lib.rs
line 142 at r1 (raw file):
Previously, nagmo-starkware wrote…
as discessed f2f
Done.
This change is