Fix: Disable LRU flushPendingWrite warning if disabled#5184
Merged
Conversation
… comments in consensus.go
ahangsu
commented
Mar 8, 2023
Codecov Report
@@ Coverage Diff @@
## master #5184 +/- ##
==========================================
- Coverage 53.51% 53.50% -0.01%
==========================================
Files 439 439
Lines 54985 54985
==========================================
- Hits 29423 29422 -1
- Misses 23271 23274 +3
+ Partials 2291 2289 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
algorandskiy
previously approved these changes
Mar 8, 2023
| @@ -68,9 +68,9 @@ const ( | |||
| ) | |||
Contributor
There was a problem hiding this comment.
this file should not be changed in this PR
Contributor
Author
There was a problem hiding this comment.
ok, reverting this and separate out for another PR then
flushPendingWrite warning if disabled, update some comments in agreementflushPendingWrite warning if disabled
jannotti
reviewed
Mar 9, 2023
Contributor
jannotti
left a comment
There was a problem hiding this comment.
I would rather see the calls that initiialise the caches in disabled mode, which currently look like this:
au.baseAccounts.init(au.log, 0, 0)
au.baseResources.init(au.log, 0, 0)
au.baseKVs.init(au.log, 0, 0)
changed to
au.baseAccounts.init(au.log, 0, 1)
au.baseResources.init(au.log, 0, 1)
au.baseKVs.init(au.log, 0, 1)
which implicitly turns off the warning, since the threshold is higher than the size.
That avoids the extra test all the time.
Contributor
Author
|
yea, that's fair, I will flip the change asap. |
algorandskiy
approved these changes
Mar 9, 2023
jannotti
approved these changes
Mar 9, 2023
flushPendingWrite warning if disabledflushPendingWrite warning if disabled
This was referenced Mar 10, 2023
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Per Pavel's request, disable
flushPendingWritewarning if LRU cache is disabled.