This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Promote dangerous cond. from just warning to panic#8439
Merged
ryoqun merged 1 commit intosolana-labs:masterfrom Feb 25, 2020
Merged
Promote dangerous cond. from just warning to panic#8439ryoqun merged 1 commit intosolana-labs:masterfrom
ryoqun merged 1 commit intosolana-labs:masterfrom
Conversation
ryoqun
commented
Feb 25, 2020
| if count > 0 { | ||
| *count_and_status = (count - 1, status); | ||
| } else { | ||
| warn!("count value 0 for slot {}", self.slot_id); |
Contributor
Author
There was a problem hiding this comment.
This actually happened locally in the way-before past, locally.
If this ever happens, it's very likely for this to cause the disastrous event of ledger inconsistency by continuing silently like this without being panic!-ed.
Contributor
Author
|
@sakridge What do you think about this PR? :) |
Codecov Report
@@ Coverage Diff @@
## master #8439 +/- ##
========================================
- Coverage 80.3% 80.3% -0.1%
========================================
Files 254 254
Lines 56221 56235 +14
========================================
+ Hits 45158 45169 +11
- Misses 11063 11066 +3 |
sakridge
approved these changes
Feb 25, 2020
Contributor
sakridge
left a comment
There was a problem hiding this comment.
Yea, sounds like a good idea to me.
mergify Bot
pushed a commit
that referenced
this pull request
Feb 25, 2020
(cherry picked from commit 0b48c8e)
mergify Bot
pushed a commit
that referenced
this pull request
Feb 25, 2020
(cherry picked from commit 0b48c8e)
solana-grimes
pushed a commit
that referenced
this pull request
Feb 25, 2020
solana-grimes
pushed a commit
that referenced
this pull request
Feb 26, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Critically bad condition is just a warning. I've been worried this for long time... Now, I'm pretty confident with the code base and the erroneous case should not happen and is really dangerous if happened ever. Dunno why this was just a warning...
Summary of Changes
Background
Split off from #8337