-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fund manager might get stale #2685
Comments
@arajasek it seems like ensure funds is keeping a cache of balances, but the only thing it's caching is reading from the StateManager which is not ... a super long operation worth caching. Is there any reason not to just delete this cache and just read directly from the statemanager? |
@magik6k or anyone who has visibility into the rationale for that cache -- are you ok with this? If so I'll just do that. |
@hannahhoward I only discovered this exists yesterday, but I think this exists to provide some "foresight". If the order goes deal1 is processed, deal1's balance updates land on state, deal2 is processed, deal2 updates land in state, your proposal would be fine. But what if it goes deal 1 is processed, deal 2 is processed, deal 1 lands in state, deal 2 lands in state? In that case, I'm guessing use state as your "source of truth" wouldn't work. The question is how likely that is -- what happens between |
ah ok makes sense. |
Update from @hannahhoward
|
resolved in #4736 |
I think the fund manager has the potential to get into a bad state. For instance, if the deal that required the funds for which
EnsureAvailable
was called fails, then there'll be more available than the fund manager thinks there is.I don't see anyway the fund manager can be informed "oh, nvm, deal failed, increase the available balance", but maybe this happens somehow?
The text was updated successfully, but these errors were encountered: