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

Restartable storage deals #270

Merged
merged 6 commits into from
Jun 15, 2020
Merged

Restartable storage deals #270

merged 6 commits into from
Jun 15, 2020

Conversation

ingar
Copy link
Contributor

@ingar ingar commented Jun 5, 2020

Summary

Use the finality states in to declare terminal states for client and provider deals. On starting up, send either a ProviderEventRestart or ClientEventRestart event to each deal that isn't in a terminal state.

Resolves #79, #78

Note

This does not make every deal restartable at any point. It just adds the plumbing so that the restart event is sent, and will work in some cases.

Before this is ready to merge

@ingar ingar force-pushed the feat/finality-states branch 3 times, most recently from de24e05 to 2744c0d Compare June 12, 2020 18:32
@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2020

Codecov Report

Merging #270 into master will decrease coverage by 1.62%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
- Coverage   65.29%   63.67%   -1.61%     
==========================================
  Files          40       40              
  Lines        2359     2400      +41     
==========================================
- Hits         1540     1528      -12     
- Misses        695      749      +54     
+ Partials      124      123       -1     
Impacted Files Coverage Δ
storagemarket/impl/client.go 0.00% <0.00%> (ø)
storagemarket/impl/clientstates/client_fsm.go 100.00% <ø> (ø)
storagemarket/impl/provider.go 5.02% <0.00%> (-0.51%) ⬇️
storagemarket/impl/providerstates/provider_fsm.go 93.94% <ø> (ø)
storagemarket/types.go 33.34% <ø> (ø)
filestore/file.go 100.00% <0.00%> (+23.53%) ⬆️

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 eec6fdc...dac72fc. Read the comment docs.

@ingar ingar marked this pull request as ready for review June 12, 2020 18:35
@ingar ingar requested a review from hannahhoward June 12, 2020 18:42
Copy link
Collaborator

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

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

Basically good but I would like to add ConnectionClosed checking into the restart and rename the Run method for Client & add an error so we're not supressing it.

The other comment is non-blocking

storagemarket/impl/client.go Outdated Show resolved Hide resolved
storagemarket/impl/client.go Outdated Show resolved Hide resolved
storagemarket/impl/client.go Outdated Show resolved Hide resolved
WIP

Remove test for ensuring that state entry fn gets executed.  This is already tested in go-statemachine.

WIP

WIP2

# Conflicts:
#	storagemarket/impl/provider.go
#	storagemarket/integration_test.go
@ingar ingar requested a review from hannahhoward June 15, 2020 19:47
@hannahhoward hannahhoward merged commit 9a88b8a into master Jun 15, 2020
@ingar ingar deleted the feat/finality-states branch June 24, 2020 16:47
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.

Storage Provider can resume deals on relaunch
3 participants