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

miner: Command to list/remove expired sectors #7140

Merged
merged 5 commits into from
Aug 24, 2021
Merged

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Aug 19, 2021

We should make this automatic at some point, but this is at least a good tool to manage expired sectors

--show-removed output:
2021-08-19-170424_792x730_scrot

The 'actually remove things' output:
2021-08-19-170441_897x1123_scrot

@magik6k magik6k added kind/feature Kind: Feature area/mining Area: Mining labels Aug 19, 2021
@magik6k magik6k requested a review from a team as a code owner August 19, 2021 15:10
@Stebalien Stebalien force-pushed the feat/miner-expired-cmd branch from 20db281 to a9bf246 Compare August 23, 2021 18:27
@Stebalien
Copy link
Member

Rebased to try to make CI green.

@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #7140 (5a23c2b) into master (01ea39a) will increase coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7140      +/-   ##
==========================================
+ Coverage   34.78%   34.84%   +0.05%     
==========================================
  Files         684      684              
  Lines       80040    80136      +96     
==========================================
+ Hits        27845    27923      +78     
- Misses      46522    46530       +8     
- Partials     5673     5683      +10     
Impacted Files Coverage Δ
chain/actors/builtin/miner/miner.go 23.58% <ø> (ø)
cmd/lotus-miner/sectors.go 11.95% <0.00%> (-1.36%) ⬇️
extern/sector-storage/manager_calltracker.go 57.70% <0.00%> (-4.85%) ⬇️
extern/sector-storage/worker_tracked.go 90.14% <0.00%> (-4.23%) ⬇️
extern/storage-sealing/fsm.go 57.02% <0.00%> (-1.21%) ⬇️
chain/store/store.go 63.76% <0.00%> (-0.72%) ⬇️
chain/sync_manager.go 66.77% <0.00%> (-0.63%) ⬇️
markets/storageadapter/dealpublisher.go 84.74% <0.00%> (-0.57%) ⬇️
chain/messagepool/selection.go 80.52% <0.00%> (-0.41%) ⬇️
storage/wdpost_changehandler.go 98.11% <0.00%> (ø)
... and 18 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 01ea39a...5a23c2b. Read the comment docs.

Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

Looks like it does the thing

cmd/lotus-miner/sectors.go Show resolved Hide resolved

// toCheck is a working bitfield which will only contain terminated sectors
toCheck := bitfield.New()
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for my education what's the point of having code blocks like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Generally just for not leaking variables into the wider function context (which makes it easier to see when we are done with those vars)

@magik6k magik6k merged commit d61612e into master Aug 24, 2021
@magik6k magik6k deleted the feat/miner-expired-cmd branch August 24, 2021 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mining Area: Mining kind/feature Kind: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants