-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fix storage worker #3820
Fix storage worker #3820
Conversation
24a416e
to
488f863
Compare
20b00a9
to
f6a7f15
Compare
Codecov Report
@@ Coverage Diff @@
## master #3820 +/- ##
==========================================
- Coverage 67.27% 67.22% -0.05%
==========================================
Files 404 404
Lines 40889 40952 +63
==========================================
+ Hits 27508 27530 +22
- Misses 9512 9541 +29
- Partials 3869 3881 +12
Continue to review full report at Codecov.
|
f6a7f15
to
e89db28
Compare
go/worker/storage/committee/node.go
Outdated
// watcherState is the (persistent) watcher state. | ||
type watcherState struct { | ||
LastBlock blockSummary `json:"last_block"` | ||
} | ||
|
||
// Node watches blocks for storage changes. | ||
type Node struct { // nolint: maligned | ||
hostNode control.ControlledNode |
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.
Should this rather be part of the common committee node? It feels like it belongs there instead.
e89db28
to
9631a2a
Compare
Before this change, rounds were considered successfully finalized even if the operation itself actually failed. This would technically lead a corrupt database state. On the other hand, the worker doesn't have much recourse to handle the situation, so the effect with this fix is to stop syncing (since no further rounds will be able to be finalized).
Errors reported by Apply were ignored and the worker just carried on with a corrupt database.
9631a2a
to
0439098
Compare
// It can happen that for this test, the client will keep selecting the byzantine | ||
// node instead of the other storage nodes and so would never be able to fully sync. | ||
// It can take up to two minutes for storage-0 to sync in this scenario with the | ||
// current shuffling method in the storage client. See also #1815. |
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.
Maybe comment on the issue #1815 to remove this after it's done.
0439098
to
2b80e98
Compare
Avoid database corruption in certain cases.