-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
store: mounting more than one store is broken #532
Comments
Lets make something that wraps a tmlibs DB to always include a prefix in all keys. Then use that to namespace the DB for each store. |
Interim fix in #722 Will leave this open to track the PrefixDB approach |
Closed by #859. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mounting more than one of the same type of store using the same underlying db is broken because there is nothing to distinguish them since they have the same version and we don't load by commit hash.
Committing one store will overwrite the other - tests thus fail non-deterministically because of iteration over maps in the store package.
I discovered this by investigating a bug where I could not query for an account balance after the node had restarted. I wrote unit tests for baseapp and basecoin that tried to query after re-initializing the app - baseapp passed and basecoin failed (non-deterministically). Since the only difference was the number of stores they mounted, I eventually pinned it down.
The text was updated successfully, but these errors were encountered: