Skip to content

Catchpoint: Promote trie-related log warnings to error#4882

Merged
algorandskiy merged 1 commit into
algorand:masterfrom
michaeldiamant:trie_errors
Dec 9, 2022
Merged

Catchpoint: Promote trie-related log warnings to error#4882
algorandskiy merged 1 commit into
algorand:masterfrom
michaeldiamant:trie_errors

Conversation

@michaeldiamant
Copy link
Copy Markdown
Contributor

Summary

Promotes log levels from warning to error for failed balancesTrie modifications. Since we've previously noted concerns here, the rationale is:

  • It'll be easier to isolate these these scenarios as errors.
  • These scenarios unambiguously represent an error. There's an invariant that's been broken.

If we accept the PR, I suspect there are other places we'll want a similar change. The PR makes no attempt to scan beyond accountsUpdateBalances.

Test Plan

Existing tests pass.

@michaeldiamant michaeldiamant marked this pull request as ready for review December 9, 2022 04:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 9, 2022

Codecov Report

Merging #4882 (a1a8c82) into master (4dd9877) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #4882   +/-   ##
=======================================
  Coverage   54.06%   54.06%           
=======================================
  Files         427      427           
  Lines       53520    53520           
=======================================
+ Hits        28934    28938    +4     
+ Misses      22319    22316    -3     
+ Partials     2267     2266    -1     
Impacted Files Coverage Δ
ledger/catchpointtracker.go 58.34% <0.00%> (ø)
ledger/tracker.go 74.26% <0.00%> (-3.80%) ⬇️
cmd/tealdbg/debugger.go 72.69% <0.00%> (-0.81%) ⬇️
network/wsNetwork.go 64.74% <0.00%> (ø)
catchup/service.go 69.80% <0.00%> (+0.72%) ⬆️
catchup/peerSelector.go 100.00% <0.00%> (+1.04%) ⬆️
network/wsPeer.go 69.45% <0.00%> (+2.38%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

root, rootErr := ct.balancesTrie.RootHash()
if rootErr != nil {
ct.log.Infof("accountsUpdateBalances: error retrieving balances trie root: %v", rootErr)
ct.log.Errorf("accountsUpdateBalances: error retrieving balances trie root: %v", rootErr)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this one doesn't seem as serious.. not related to any major data invariant being broken

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cce I agree it's not as serious. If you feel strongly, I can open a new PR to revert the log level change - let me know?

I felt a failure here likely implies an issue with how the software is written rather than how it's used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants