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

Fix resource hogging when waiting for role transition #2676

Merged
merged 3 commits into from
Feb 7, 2019

Conversation

sagar-solana
Copy link
Contributor

@sagar-solana sagar-solana commented Feb 6, 2019

Problem

The loop in handle_role_transition is non-blocking so it just sits there spinning until it receives a rotation signal from a TPU/TVU
More info: #2645

Summary of Changes

Switched to revc_timeout from revc and wait for the correct TPU/TVU receiver to signal a transition.

Fixes #2645

@sagar-solana sagar-solana requested a review from mvines February 6, 2019 23:33
@codecov
Copy link

codecov bot commented Feb 7, 2019

Codecov Report

Merging #2676 into master will decrease coverage by <.1%.
The diff coverage is 35.7%.

@@           Coverage Diff            @@
##           master   #2676     +/-   ##
========================================
- Coverage    76.6%   76.6%   -0.1%     
========================================
  Files         114     114             
  Lines       18583   18588      +5     
========================================
+ Hits        14249   14250      +1     
- Misses       4334    4338      +4

src/fullnode.rs Outdated
@@ -103,6 +103,7 @@ pub struct Fullnode {
broadcast_socket: UdpSocket,
pub node_services: NodeServices,
pub role_notifiers: (TvuRotationReceiver, TpuRotationReceiver),
role_senders: (TvuRotationSender, TpuRotationSender),
Copy link
Contributor Author

@sagar-solana sagar-solana Feb 7, 2019

Choose a reason for hiding this comment

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

@mvines, haalp. This turned out a bit ugly. I need to cache the senders so that I can reliably abort when exit is signaled on the closure returned form run().

@mvines mvines merged commit acc6bf1 into solana-labs:master Feb 7, 2019
@sagar-solana sagar-solana deleted the fix_role_transition branch February 7, 2019 05:32
joncinque pushed a commit to joncinque/solana that referenced this pull request Aug 22, 2024
…checking it in ProgressMap. (solana-labs#2676)

* Check poh_recorder.start_slot() hasn't been dumped previously before checking it in progress_map.

* Add more comments and put in checks for maybe_start_leader.

* Update core/src/replay_stage.rs

Co-authored-by: Ashwin Sekar <[email protected]>

* Use a slot which I am not leader to avoid dumping my own slot panic.

* Address reviewer comments.

* Address reviewer comments.

---------

Co-authored-by: Ashwin Sekar <[email protected]>
CriesofCarrots pushed a commit to CriesofCarrots/solana that referenced this pull request Aug 27, 2024
…efore checking it in ProgressMap. (backport of solana-labs#2676) (solana-labs#2691)

Check poh_recorder.start_slot() hasn't been dumped previously before checking it in ProgressMap. (solana-labs#2676)

* Check poh_recorder.start_slot() hasn't been dumped previously before checking it in progress_map.

* Add more comments and put in checks for maybe_start_leader.

* Update core/src/replay_stage.rs

Co-authored-by: Ashwin Sekar <[email protected]>

* Use a slot which I am not leader to avoid dumping my own slot panic.

* Address reviewer comments.

* Address reviewer comments.

---------

Co-authored-by: Ashwin Sekar <[email protected]>
(cherry picked from commit 053faa6)

Co-authored-by: Wen <[email protected]>
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Aug 27, 2024
…checking it in ProgressMap. (solana-labs#2676)

* Check poh_recorder.start_slot() hasn't been dumped previously before checking it in progress_map.

* Add more comments and put in checks for maybe_start_leader.

* Update core/src/replay_stage.rs

Co-authored-by: Ashwin Sekar <[email protected]>

* Use a slot which I am not leader to avoid dumping my own slot panic.

* Address reviewer comments.

* Address reviewer comments.

---------

Co-authored-by: Ashwin Sekar <[email protected]>
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