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

store: mounting more than one store is broken #532

Closed
ebuchman opened this issue Mar 1, 2018 · 3 comments
Closed

store: mounting more than one store is broken #532

ebuchman opened this issue Mar 1, 2018 · 3 comments
Assignees

Comments

@ebuchman
Copy link
Member

ebuchman commented Mar 1, 2018

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.

@jaekwon
Copy link
Contributor

jaekwon commented Mar 10, 2018

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.

@ebuchman
Copy link
Member Author

Interim fix in #722

Will leave this open to track the PrefixDB approach

@cwgoes
Copy link
Contributor

cwgoes commented Apr 15, 2018

Closed by #859.

@cwgoes cwgoes closed this as completed Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants