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

storagefsm: Trigger input processing when below limits #5801

Merged
merged 7 commits into from
Mar 12, 2021

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Mar 12, 2021

Currently when a miner starts processing more deals in parallel than the configured sealing limits, we wouldn't start processing more deals after the first batch of sectors got sealed.

This should fix that case

@magik6k magik6k changed the title storagefsm: Trigger input processing wheen below limits storagefsm: Trigger input processing when below limits Mar 12, 2021
shouldUpdateInput := m.stats.updateSector(cfg, m.minerSectorID(state.SectorNumber), state.State)

// trigger more input processing when we've dipped below max sealing limits
if shouldUpdateInput {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changing this to shouldUpdateInput && false makes TestBatchDealInput fail reliably

extern/storage-sealing/fsm.go Show resolved Hide resolved
extern/storage-sealing/stats.go Outdated Show resolved Hide resolved
extern/storage-sealing/fsm.go Show resolved Hide resolved
Comment on lines +403 to +404
// update stats early, fsm planner would do that async
m.stats.updateSector(cfg, m.minerSectorID(sid), UndefinedSectorState)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this we could end up creating a bunch of sectors at once, and start more parallel work than specified by the max sealing sector config.

Copy link
Member

Choose a reason for hiding this comment

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

This seems a bit brittle. Can we have a m.createSector function that calls NewSector and updates the stats?

@magik6k magik6k requested a review from Stebalien March 12, 2021 16:27
Comment on lines +403 to +404
// update stats early, fsm planner would do that async
m.stats.updateSector(cfg, m.minerSectorID(sid), UndefinedSectorState)
Copy link
Member

Choose a reason for hiding this comment

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

This seems a bit brittle. Can we have a m.createSector function that calls NewSector and updates the stats?

@magik6k magik6k requested a review from Stebalien March 12, 2021 17:42
@magik6k magik6k merged commit 1aea1eb into master Mar 12, 2021
@magik6k magik6k deleted the fix/fsm-input-stuck branch March 12, 2021 18:02
@magik6k magik6k mentioned this pull request Apr 13, 2021
69 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.

2 participants