Skip to content
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

bug: sealing: FinalizeReplicaUpdate #8018

Merged
merged 15 commits into from
Feb 9, 2022
Merged

bug: sealing: FinalizeReplicaUpdate #8018

merged 15 commits into from
Feb 9, 2022

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Feb 2, 2022

Related Issues

Closes #8012

Depends on filecoin-project/specs-storage#22

Proposed Changes

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: 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, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@magik6k magik6k requested a review from a team as a code owner February 2, 2022 20:24
@magik6k magik6k changed the title wip[ FinalizeReplicaUpdate [wip] FinalizeReplicaUpdate Feb 2, 2022
@magik6k magik6k marked this pull request as draft February 2, 2022 20:24

return ffi.ClearCache(uint64(ssize), paths.Cache)

// TODO: ^ above but for snapdeals
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main todo; not sure if passing UpdateCache into ClearCache is/does the correct thing

@codecov
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #8018 (84d70ca) into master (b27196b) will decrease coverage by 0.01%.
The diff coverage is 52.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8018      +/-   ##
==========================================
- Coverage   39.21%   39.19%   -0.02%     
==========================================
  Files         660      660              
  Lines       71436    71587     +151     
==========================================
+ Hits        28014    28062      +48     
- Misses      38602    38693      +91     
- Partials     4820     4832      +12     
Impacted Files Coverage Δ
api/api_storage.go 0.00% <ø> (ø)
cmd/lotus-miner/info.go 60.11% <ø> (ø)
cmd/lotus-seal-worker/main.go 0.00% <0.00%> (ø)
extern/sector-storage/mock/mock.go 60.62% <0.00%> (-0.64%) ⬇️
extern/sector-storage/sealtasks/task.go 81.81% <ø> (ø)
extern/sector-storage/storiface/worker.go 76.00% <ø> (ø)
extern/storage-sealing/states_failed.go 0.00% <0.00%> (ø)
extern/sector-storage/worker_local.go 60.00% <36.36%> (-0.80%) ⬇️
extern/storage-sealing/fsm_events.go 50.00% <40.00%> (-0.33%) ⬇️
extern/sector-storage/ffiwrapper/sealer_cgo.go 58.62% <40.74%> (-0.95%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b27196b...84d70ca. Read the comment docs.

@magik6k magik6k changed the title [wip] FinalizeReplicaUpdate FinalizeReplicaUpdate Feb 8, 2022
@magik6k magik6k marked this pull request as ready for review February 8, 2022 16:45
Copy link
Contributor

@ZenGround0 ZenGround0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

One thing this reminds me of is that we should probably track work for calling manager ReleaseSectorKey during the finalize step based on a config param. I think right now we end up carrying original Replica, UpdatedReplica and UnsealedData by default. And I don't think there's a good way to configure dropping the sector key.

--edit--
reminder to update specs-storage dependency to master

@remakeZK
Copy link

remakeZK commented Feb 9, 2022

Should old sealed files keep in the path until ChainFanilty?Since winning post check the sector state in the past, clear old sealed immediately may cause some unexcept problem

@magik6k
Copy link
Contributor Author

magik6k commented Feb 9, 2022

Should old sealed files keep in the path until ChainFanilty?Since winning post check the sector state in the past, clear old sealed immediately may cause some unexcept problem

They are kept, this PR doesn't handle cleanup of those, this will come as a follow-up

@magik6k
Copy link
Contributor Author

magik6k commented Feb 9, 2022

Or maybe that's easy enough to do now

@magik6k magik6k marked this pull request as draft February 9, 2022 10:30
@ZenGround0
Copy link
Contributor

Yeah thanks @remakeZK, I was forgetting about winning post. We'll need a separate state to do sector key cleanup, or postpone finalize by 2 finalities and do it there.

@magik6k magik6k marked this pull request as ready for review February 9, 2022 11:43
@magik6k magik6k merged commit e7038d2 into master Feb 9, 2022
@magik6k magik6k deleted the feat/fru branch February 9, 2022 17:40
@jennijuju
Copy link
Member

Need better PR title

@jennijuju jennijuju changed the title FinalizeReplicaUpdate bug: sealing: FinalizeReplicaUpdate Feb 10, 2022
@jennijuju jennijuju mentioned this pull request Feb 10, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(SnapDeals) snap-up deal files does not move to long term storage, stays in sealing path.
5 participants