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

Conversation

ilya-bobyr
Copy link
Contributor

Problem

Geyser plugin thread would never shutdown correctly, as it is using an exit flag that is never set.

Summary of Changes

Use common exit flag.

And a minor refactoring in the use statement.

Geyser plugin thread would never shutdown correctly, as it is using an
exit flag that is never set.
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #31915 (a872c0a) into master (1d6b033) will decrease coverage by 0.1%.
The diff coverage is 0.0%.

@@            Coverage Diff            @@
##           master   #31915     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         757      757             
  Lines      207054   207053      -1     
=========================================
- Hits       169648   169645      -3     
- Misses      37406    37408      +2     

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Just to save someone else the verification I just did, #30352 added an earlier exit on L492. I was concerned the duplication was deliberate as part of hot-reloading geyser plugins. However, that PR also removed this later exit. This line was re-added in #30645 in what I believe was a bad rebase (touches adjacent code, merged one day later).

Anyway, thank you for fixing this @ilya-bobyr. I think we should backport to v1.16

Copy link
Contributor

@steviez steviez left a comment

Choose a reason for hiding this comment

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

LGTM, good find!

And thanks for tracking down the specific PR's @CriesofCarrots, agreed with your assessment as to why we had two exits. And agreed on backporting.

@ilya-bobyr
Copy link
Contributor Author

Just to save someone else the verification I just did, #30352 added an earlier exit on L492. I was concerned the duplication was deliberate as part of hot-reloading geyser plugins. However, that PR also removed this later exit. This line was re-added in #30645 in what I believe was a bad rebase (touches adjacent code, merged one day later).

Anyway, thank you for fixing this @ilya-bobyr. I think we should backport to v1.16

Thank you for checking!
I did not look at the history, but I did trace the flag usage before making the change.
Geyser never changes the flag value. So, it will always stay false, effectively preventing the shutdown.

@ilya-bobyr ilya-bobyr merged commit e0389ba into solana-labs:master Jun 1, 2023
@ilya-bobyr ilya-bobyr deleted the pr/geyser-exit branch June 1, 2023 18:21
@ilya-bobyr ilya-bobyr added the v1.16 PRs that should be backported to v1.16 label Jun 1, 2023
mergify bot pushed a commit that referenced this pull request Jun 1, 2023
Geyser plugin thread would never shutdown correctly, as it is using an
exit flag that is never set.

(cherry picked from commit e0389ba)
@ilya-bobyr
Copy link
Contributor Author

Thinking a bit more about this.
The fact that an invalid merge did not trigger any tests means there are no tests that check valid shutdown for the individual validator services.

ilya-bobyr pushed a commit that referenced this pull request Jun 1, 2023
…) (#31924)

Geyser plugin thread would never shutdown correctly, as it is using an
exit flag that is never set.

(cherry picked from commit e0389ba)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
v1.16 PRs that should be backported to v1.16
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants