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

DSN sync refactoring and optimizations #1806

Merged
merged 8 commits into from
Aug 14, 2023
Merged

DSN sync refactoring and optimizations #1806

merged 8 commits into from
Aug 14, 2023

Conversation

nazar-pc
Copy link
Member

As I was working on #1803 I noticed some inefficiencies and potential improvements.

Related to #1797 this PR persists retrieved segment headers in aux store, meaning they are potentially stored in large batches (efficient DB usage, lower write amplification, faster retrieval on restart) and avoids downloading those that were persisted (for whatever reason) in the past.

TODO about #1803 was added in the process or refactoring and is basically one step from being resolved (will happen in the next PR).

Overall this PR will ensure we make even fewer requests and download even less data from the network during DSN sync.

Code contributor checklist:

@nazar-pc
Copy link
Member Author

@dariolina not sure if it is worth mentioning in the doc, but last commit here stops retries for segment headers if we didn't get 20 responses, but got the same response twice in a row, meaning we likely connected to all existing peers anyway.

@nazar-pc nazar-pc merged commit 86b24af into main Aug 14, 2023
9 checks passed
@nazar-pc nazar-pc deleted the dsn-sync-refactoring branch August 14, 2023 06:17
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