Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

State store does not currently work with the Sqlite implementation #1424

Closed
tcharding opened this issue Sep 20, 2019 · 1 comment
Closed
Assignees
Labels
to-refine Clarifications are needed

Comments

@tcharding
Copy link
Collaborator

tcharding commented Sep 20, 2019

Not a candidate for grooming because the problem does not lend itself to a solution that can be implemented in a single sprint. More thought needs to go into the issue description as the problem is better understood.

Problem: Currently we are not able to expose past swaps (read from the Sqlite database) to cnd clients. This is because if the StateStore is not initialized (i.e., in a valid state) then the HTTP API returns an error.

Goal: Make StateStore function correctly with the Sqlite database implementaition.

Side Note: This can be solved if we are able to initialize the StateStore using the data that is read from the database for past swaps. During discussion of this with @thomaseizinger it was pointed out that the current in memory state store 'communicates' actions during the update function. I did not fully understand the exact process by which this happens but the result is that we may need to change/fix this so that re-starting the statestore from past swaps does not do the communication multiple times. @thomaseizinger could you please explain this during grooming.

Solution idea: Once db::MetadataStore uses our custom types instead of String we could implement the ActorStore trait for it. This would allow using records read from the database to initialize the state store. This implies that we add extra fields to the Metadata struct - at this stage (if not already done) we should probably rename Metadata to Swap and put all the swap details in it.

@tcharding tcharding changed the title Initialize state store from stored swaps State store does not currently work with the Sqlite implementation Sep 22, 2019
@tcharding tcharding self-assigned this Sep 22, 2019
@luckysori luckysori added the to-refine Clarifications are needed label Oct 16, 2019
@tcharding
Copy link
Collaborator Author

See the database epic for details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
to-refine Clarifications are needed
Projects
None yet
Development

No branches or pull requests

2 participants