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

More verbose output on init-sync #7578

Merged
merged 10 commits into from Oct 20, 2020
Merged

Conversation

farazdagi
Copy link
Contributor

What type of PR is this?

Other

What does this PR do? Why is it needed?

  • To debug current init-sync issues we need more verbose output, the PR adds it.

Which issues(s) does this PR fix?

N/A

Other notes for review

@farazdagi farazdagi requested a review from a team as a code owner October 20, 2020 01:20
@farazdagi farazdagi self-assigned this Oct 20, 2020
@farazdagi farazdagi added the Ready For Review A pull request ready for code review label Oct 20, 2020
terencechain
terencechain previously approved these changes Oct 20, 2020
@@ -112,7 +112,7 @@ func (s *Service) processFetchedData(

// Use Batch Block Verify to process and verify batches directly.
if err := s.processBatchedBlocks(ctx, genesis, data.blocks, s.chain.ReceiveBlockBatch); err != nil {
log.WithError(err).Debug("Batch is not processed")
log.WithError(err).Warn("Batch is not processed")
Copy link
Member

Choose a reason for hiding this comment

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

can you remove WithError it prints the whole stack trace which can get very noisy. We just want to print the main error

@@ -124,7 +124,9 @@ func (s *Service) processFetchedDataRegSync(
blockReceiver := s.chain.ReceiveBlock
for _, blk := range data.blocks {
if err := s.processBlock(ctx, genesis, blk, blockReceiver); err != nil {
log.WithError(err).Debug("Block is not processed")
log.WithError(err).WithFields(logrus.Fields{
Copy link
Member

Choose a reason for hiding this comment

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

same here lets remove WithError

@farazdagi farazdagi requested a review from nisdas October 20, 2020 13:38
@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #7578 into master will increase coverage by 0.01%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master    #7578      +/-   ##
==========================================
+ Coverage   61.64%   61.66%   +0.01%     
==========================================
  Files         423      423              
  Lines       29613    29622       +9     
==========================================
+ Hits        18256    18265       +9     
+ Misses       8439     8433       -6     
- Partials     2918     2924       +6     

@prylabs-bulldozer prylabs-bulldozer bot merged commit 0b53a89 into master Oct 20, 2020
@delete-merged-branch delete-merged-branch bot deleted the init-sync-more-logs branch October 20, 2020 14:59
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

3 participants