-
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/snap deals storage #7615
Feat/snap deals storage #7615
Conversation
24bc634
to
1f79db0
Compare
2e37de1
to
797c15b
Compare
Codecov Report
@@ Coverage Diff @@
## next #7615 +/- ##
==========================================
+ Coverage 39.50% 39.56% +0.05%
==========================================
Files 646 646
Lines 68376 68582 +206
==========================================
+ Hits 27015 27136 +121
- Misses 36722 36772 +50
- Partials 4639 4674 +35
Continue to review full report at Codecov.
|
7ef1652
to
7d2b3f0
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.
Don't see much to complain about, looks pretty clean
// for _, path := range t.StoragePaths { | ||
// if err := os.RemoveAll(path.Path); err != nil { | ||
// fmt.Println("Cleanup error:", 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.
Bring back before merging (could add an env var to turn this cleanup off)
case "2k": | ||
case "8M": |
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.
Missing 2k?
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 should be covered by the default above
ctx, cancel := context.WithCancel(ctx) | ||
defer cancel() | ||
|
||
wk, wait, cancel, err := m.getWork(ctx, sealtasks.TTProveReplicaUpdate1, sector, sectorKey, newSealed, newUnsealed) |
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.
Wait, doesn't this cancel shadow the cancel above, and don't we end up calling the getWork
cancel twice, and not calling context.WithCancel
?
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.
(I realize we're doing the same above)
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.
I think the first cancel function is captured before shadowing by the first defer. I wasn't sure and made this example to get to this conclusion: https://go.dev/play/p/5IAnJuFg69N. I think that means this pattern is ok. Make sense to you?
(we also should bump minor worker/miner API versions ( |
Good call out. I don't know the workflow for rebasing next on master but will do this when that time comes. |
WIP introducing snap deals support for sector storage by adding a new file type.
Needs filecoin-project/specs-storage#17