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
Labels
to-refine
Clarifications are needed
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 theupdate
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 theMetadata
struct - at this stage (if not already done) we should probably renameMetadata
toSwap
and put all the swap details in it.The text was updated successfully, but these errors were encountered: