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

Factor out repair from gossip #8044

Merged
merged 1 commit into from
Jan 31, 2020
Merged

Conversation

carllin
Copy link
Contributor

@carllin carllin commented Jan 30, 2020

Problem

Repair is functionally and logically distinct from gossip, and does not need to be integrated into the same service.

Summary of Changes

Factor out serving repair from gossip

Testnet results here for before and after the change: https://metrics.solana.com:3000/d/testnet-edge/testnet-monitor-edge?orgId=2&from=1580415668783&to=1580419956328&var-datasource=Solana%20Metrics%20(read-only)&var-testnet=testnet-dev-carl&var-hostid=All&panelId=49

Fixes #

return None;
}

/*me.write()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sagar-solana, this used to update on every repair request, I'm not sure if it's still necessary

Copy link
Contributor

Choose a reason for hiding this comment

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

This just makes sure that we refresh the timestamps (liveness) of every value the from the repairee. We don't need to do it every time but we should update it at some cadence

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so it's essential repair updates this, gossip push/pull isn't enough?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not essential. I'm okay skipping it here.

let value_size = value.size();
let expected_len = NUM_VALUES / (MAX_PROTOCOL_PAYLOAD_SIZE / value_size).max(1) as usize;
let msgs = vec![value; NUM_VALUES];
let num_values_per_payload = (MAX_PROTOCOL_PAYLOAD_SIZE / value_size).max(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sagar-solana on test_split_messages_large, MAX_PROTOCOL_PAYLOAD_SIZE / value_size == 0, does that mean there are just some messages that are too large to fit in the payload?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, things like epoch_slots can grow too large.

@codecov
Copy link

codecov bot commented Jan 30, 2020

Codecov Report

Merging #8044 into master will decrease coverage by <.1%.
The diff coverage is 73.1%.

@@           Coverage Diff            @@
##           master   #8044     +/-   ##
========================================
- Coverage    81.9%   81.9%   -0.1%     
========================================
  Files         244     249      +5     
  Lines       53316   53454    +138     
========================================
+ Hits        43681   43784    +103     
- Misses       9635    9670     +35

@carllin carllin force-pushed the FixClusterInfo branch 2 times, most recently from 9a1c8d6 to 0aa652a Compare January 31, 2020 05:57
@carllin carllin merged commit e612576 into solana-labs:master Jan 31, 2020
carllin added a commit to carllin/solana that referenced this pull request Feb 6, 2020
carllin added a commit that referenced this pull request Feb 6, 2020
carllin added a commit to carllin/solana that referenced this pull request Feb 11, 2020
carllin added a commit to carllin/solana that referenced this pull request Feb 11, 2020
mvines pushed a commit that referenced this pull request Feb 11, 2020
mergify bot pushed a commit that referenced this pull request Feb 11, 2020
(cherry picked from commit d3712dd)
solana-grimes pushed a commit that referenced this pull request Feb 11, 2020
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