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

Better Logging When Using Head Sync #7626

Merged
merged 2 commits into from Oct 23, 2020
Merged

Better Logging When Using Head Sync #7626

merged 2 commits into from Oct 23, 2020

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Oct 23, 2020

What type of PR is this?

Logging

What does this PR do? Why is it needed?

  • Gives an informational warning when starting up.
  • Resumes stategen in the conditional block.

Which issues(s) does this PR fix?

N.A

Other notes for review

@nisdas nisdas requested a review from a team as a code owner October 23, 2020 10:48
@nisdas nisdas added the Ready For Review A pull request ready for code review label Oct 23, 2020
@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #7626 into master will increase coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #7626      +/-   ##
==========================================
+ Coverage   61.85%   61.87%   +0.01%     
==========================================
  Files         422      422              
  Lines       29700    29723      +23     
==========================================
+ Hits        18370    18390      +20     
- Misses       8412     8416       +4     
+ Partials     2918     2917       -1     

@@ -431,6 +431,12 @@ func (s *Service) initializeChainInfo(ctx context.Context) error {
if err != nil {
return errors.Wrap(err, "could not hash head block")
}
finalizedState, err := s.stateGen.Resume(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a bug that caused by not running s.stateGen.Resume here?

If yes, can you please add some descriptions for the bug? and maybe a regression test?

Copy link
Member

Choose a reason for hiding this comment

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

There is no bug, the finalized state is accessed for info purposes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah not really I just saw that we resumed stategen in the normal path, so I thought it would be correct to do it here too. I used the archived state to determine the starting point of our head sync.

@prylabs-bulldozer prylabs-bulldozer bot merged commit ff50ea2 into master Oct 23, 2020
@delete-merged-branch delete-merged-branch bot deleted the betterLogging branch October 23, 2020 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants