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

Persist retrieval market counter to disk #125

Merged
merged 1 commit into from Feb 27, 2020

Conversation

hannahhoward
Copy link
Collaborator

Goals

Make retrieval deal id incrementing survive restarts so they can serve as unique deal ids for a single retrieval client (fix #66 )

Implementation

  • Create a simple stored counter interface that saves an incrementing counter on top of a data store
  • Use it in retrieval market

For Discussion

  • The integration test recreates all the test data on each retrieval and therefore does not test the counter -- should it?
  • This should go in after Use go-statemachine + FSMs in retrieval market #124 cause it's on top of it (I currently set that branch as the base)

Copy link
Contributor

@shannonwells shannonwells left a comment

Choose a reason for hiding this comment

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

looks good to me. I'm not sure whether explicitly testing the counter in the integration test is necessary; my kneejerk reaction was "of course you should test it in the integration test", but it looks like the unit tests are good enough.

make a shared counter util for persisting a unique deal id counter to disk
@hannahhoward hannahhoward changed the base branch from feat/use-statemachine-in-retrieval to master February 27, 2020 01:11
@hannahhoward hannahhoward merged commit 9b5564b into master Feb 27, 2020
@hannahhoward hannahhoward deleted the feat/persisted-counter branch April 30, 2020 21:33
@dirkmc dirkmc mentioned this pull request Dec 8, 2020
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.

Client's NextDealID is persisted to disk
2 participants