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

Add maximum repair length to db_window #1886

Merged
merged 3 commits into from
Nov 22, 2018

Conversation

carllin
Copy link
Contributor

@carllin carllin commented Nov 22, 2018

Problem

The number of repairs could now be potentially unbounded, which causes massive congestion on the network.

Summary of Changes

Limit the number of repairs a node can fire off at once

Fixes #

@carllin carllin requested a review from rob-solana November 22, 2018 02:03
src/db_window.rs Outdated
max_repair_entry_height - 1,
MAX_REPAIR_LENGTH,
);
idxs.truncate(MAX_REPAIR_LENGTH);
Copy link
Contributor

Choose a reason for hiding this comment

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

why are you truncating if find_missing is limiting its output?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, I thought I had already removed this, good catch.

src/db_window.rs Outdated
@@ -17,6 +17,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, RwLock};
use streamer::BlobSender;

pub const MAX_REPAIR_LENGTH: usize = 100;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this a power of 2?

@carllin carllin force-pushed the AddMaximumRepairLength branch from b71302f to 37cebdc Compare November 22, 2018 03:25
@carllin carllin merged commit 521de13 into solana-labs:master Nov 22, 2018
tao-stones pushed a commit to tao-stones/solana that referenced this pull request Jul 1, 2024
…-labs#1809) (solana-labs#1886)

* Remove support for deprecated rpc endpoints (solana-labs#1809)

* Remove rpc_obsolete_v1_7

* Remove rpc_deprecated_v1_7

* Remove rpc_deprecated_v1_9

* Add CHANGELOG entry

* Add another CHANGELOG entry

(cherry picked from commit 83527d9)

# Conflicts:
#	CHANGELOG.md

* Fix conflict

---------

Co-authored-by: Tyera <tyera@anza.xyz>
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