Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Add maximum repair length to db_window#1886

Merged
carllin merged 3 commits intosolana-labs:masterfrom
carllin:AddMaximumRepairLength
Nov 22, 2018
Merged

Add maximum repair length to db_window#1886
carllin merged 3 commits intosolana-labs:masterfrom
carllin:AddMaximumRepairLength

Conversation

@carllin
Copy link
Copy Markdown
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
Comment thread src/db_window.rs Outdated
max_repair_entry_height - 1,
MAX_REPAIR_LENGTH,
);
idxs.truncate(MAX_REPAIR_LENGTH);
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/db_window.rs Outdated
use std::sync::{Arc, RwLock};
use streamer::BlobSender;

pub const MAX_REPAIR_LENGTH: usize = 100;
Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants