You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently to rename a store in upgrade, it renames all the existing keys in that store, which is very heavy.
We propose a cheap way to do that.
Problem Definition
No response
Proposed Feature
We had cheap renaming in memiavl, I think the idea can be adapted to iavl as well similarly. The idea is to maintain a version-ed logical name to physical name mapping, to rename a store, we simply change the logical name in the mapping.
{prefix}-{version}: [(logical store name, physical store name)]
When load a multistore, we load the store name mapping into memory as well, and handle the name conversion accordingly.
The mapping should be stored in a version-ed way, and only save to db when modified, when loading a multistore, we should seek the correct version of the mapping based on target version.
The map is small, renaming operations are not frequent, performance overhead should be very small.
The text was updated successfully, but these errors were encountered:
Summary
Currently to rename a store in upgrade, it renames all the existing keys in that store, which is very heavy.
We propose a cheap way to do that.
Problem Definition
No response
Proposed Feature
We had cheap renaming in memiavl, I think the idea can be adapted to iavl as well similarly. The idea is to maintain a version-ed logical name to physical name mapping, to rename a store, we simply change the logical name in the mapping.
When load a multistore, we load the store name mapping into memory as well, and handle the name conversion accordingly.
The mapping should be stored in a version-ed way, and only save to db when modified, when loading a multistore, we should seek the correct version of the mapping based on target version.
The map is small, renaming operations are not frequent, performance overhead should be very small.
The text was updated successfully, but these errors were encountered: