Tests: No Cache Testing in ledger#5058
Merged
Merged
Conversation
7f1b4a8 to
074cac2
Compare
074cac2 to
4e2e30e
Compare
Codecov Report
@@ Coverage Diff @@
## master #5058 +/- ##
=======================================
Coverage 53.42% 53.42%
=======================================
Files 431 432 +1
Lines 54369 54412 +43
=======================================
+ Hits 29046 29071 +25
- Misses 23061 23079 +18
Partials 2262 2262
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
efbf2f1 to
1a8be94
Compare
356e757 to
c199c7f
Compare
fdc596e to
4ef03ae
Compare
1ca465a to
e3b026f
Compare
e3b026f to
f5f2af3
Compare
ahangsu
commented
Jan 31, 2023
| require.Equal(t, testcases[0].boxValue, val) | ||
| addKV2AU(testcases[4].appID, testcases[4].boxKey, testcases[4].boxValue) | ||
| _, err = readKey(testcases[0].appID, testcases[0].boxKey) | ||
| require.NoError(t, err) |
Contributor
Author
There was a problem hiding this comment.
this is the place that will hit error, for first box (testcase[0]) goes into db after kvdelta:
- with LRU cache on, account-update reads from cache and still can get result, so it will not hit db read.
- otherwise, with nothing read from LRU cache and kvdelta, goes into DB and trigger panic.
Contributor
There was a problem hiding this comment.
great. thanks for this sanity check.
…he test" This reverts commit f5f2af3.
algorandskiy
previously approved these changes
Feb 10, 2023
cce
reviewed
Feb 10, 2023
cce
reviewed
Feb 10, 2023
cce
reviewed
Feb 15, 2023
cce
reviewed
Feb 15, 2023
cce
reviewed
Feb 15, 2023
jannotti
reviewed
Feb 15, 2023
jannotti
reviewed
Feb 15, 2023
jannotti
previously approved these changes
Feb 15, 2023
Contributor
jannotti
left a comment
There was a problem hiding this comment.
Had some minor comments, but I approve. Let me know when you want it merged.
Contributor
Author
|
Thanks for the previous approval @jannotti ! Let's see if I can get Chris approving it tomorrow, then we merge with 2 approvals. |
cce
reviewed
Feb 16, 2023
cce
approved these changes
Feb 16, 2023
jannotti
approved these changes
Feb 17, 2023
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
Had a discussion with Pavel on disabling ledger LRU cache for testing purpose, we settled down on following design/implementation:
DisableLedgerLRUCacheinLocal(config/localTemplate.go)disableCache = cfg.DisableLedgerLRUCache.!initializeFromDisk, init lrukv/lruaccts/lruresources/lruOnlineAccounts withpendingWrite = 0.pendingWrite == 0, setdisableWrite*to be True.disableWrite*is True, then bypasses thewriteoperation, such that it never writes intokvs(or map structure alike).Test Plan
Need to design on testcase to confirm that it works...