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
lastSnapshot marker fix #5642
lastSnapshot marker fix #5642
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## rc/v1.7.0 #5642 +/- ##
=============================================
- Coverage 80.34% 80.31% -0.04%
=============================================
Files 708 710 +2
Lines 94096 94132 +36
=============================================
Hits 75601 75601
- Misses 13187 13220 +33
- Partials 5308 5311 +3
☔ View full report in Codecov by Sentry. |
state/snapshotsManager.go
Outdated
err := trieStorageManager.PutInEpoch([]byte(lastSnapshot), rootHash, epoch) | ||
handleLoggingWhenError("could not set lastSnapshot", err, "rootHash", rootHash) | ||
}() | ||
go sm.lastSnapshotMarker.AddMarker(trieStorageManager, epoch, rootHash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AddMarker will check internally for WaitForStorageEpochChange
, should we avoid that in ImportDB processing mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, there is no need for this if we run in importDB mode.
if check.IfNil(args.LastSnapshotMarker) { | ||
return nil, ErrNilLastSnapshotMarker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit test for nil check LastSnapshotMarker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
…e-migration change gas cost for migrate data trie built in function
chore: fixed create release workflow
…ion-example update guardians tx construction example
@@ -10,7 +10,7 @@ import ( | |||
logger "github.com/multiversx/mx-chain-logger-go" | |||
) | |||
|
|||
var log = logger.GetOrCreate("state") | |||
var log = logger.GetOrCreate("storage") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storage/storageEpochChange
to comply with the rest of the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal allin test: v1.5.13-dev-config-8c685c8e00 -> test-last-snapshot-marker--53d20a600c
--- Specific errors ---
block hash does not match 8716
wrong nonce in block 2958
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0
/------/
--- Statistics ---
Nr. of all ERRORS: 0
Nr. of all WARNS: 385
Nr. of new ERRORS: 0
Nr. of new WARNS: 20
Nr. of PANICS: 0
/------/
--- ERRORS ---
/------/
--- WARNINGS ---
/------/
The base branch was changed.
Reasoning behind the pull request
lastSnapshot
marker was put in the new epoch before the storers could actually open the new epoch storer. This triggered anWARN
print, and the marker was not saved to storage.Proposed changes
PutInEpoch
for thelastSnapshot
marker, wait for the storers to change epochs.lastSnapshot
marker operationsTesting procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?