-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: storage: Path type filters #9013
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9013 +/- ##
==========================================
+ Coverage 40.69% 40.74% +0.05%
==========================================
Files 707 707
Lines 78737 78875 +138
==========================================
+ Hits 32043 32139 +96
- Misses 41235 41251 +16
- Partials 5459 5485 +26
|
e842992
to
2c801b8
Compare
2c801b8
to
07dc204
Compare
// if api shuts down before mining, we may get an error which we should probably just ignore | ||
// (fixing it will require rewriting most of the mining loop) | ||
if err != nil && !strings.Contains(err.Error(), "websocket connection closed") { | ||
require.NoError(bm.t, err) | ||
} | ||
|
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.
review note: This isn't exactly related to this PR, but it should fix lots of test flakiness we're seeing
07dc204
to
ac2ea03
Compare
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.
Nits, but looks like it works.
i.pathAlerts[si.ID] = i.alerting.AddAlertType("sector-index", "pathconf-"+string(si.ID)) | ||
} | ||
|
||
var hasConfigIsses bool |
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.
What is this variable name supposed to be saying?
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.
It tells you whether there are issues in the storage path config.
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
Related Issues
Implements #8794
Proposed Changes
Add two new fields to
[storagepath]/sectorstore.json
:After a path with this config is attached, lotus-miner will stop putting new files of disallowed types into that path.
If there are existing files with disallowed types in a path, those files will remain readable for PoSt/Retrieval, so the worst that can happen in case of misconfiguration is that sealing tasks will get stuck waiting for storage to become available.
The most basic setup to separate sealed data from unsealed copies would be to:
"DenyTypes": ["unsealed"]
to long-term sealed storage paths"AllowTypes": ["unsealed"]
to long-term unsealed storage pathsHere's how storage list looks with filters set:
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, testarea
: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps