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

Rebalancing keys? #4

Open
fasiha opened this issue May 11, 2019 · 2 comments
Open

Rebalancing keys? #4

fasiha opened this issue May 11, 2019 · 2 comments

Comments

@fasiha
Copy link
Owner

fasiha commented May 11, 2019

Consider LexoRank in Jira that requires periodic rebalancing to respace the lexical space.

Can Mudder or a higher-level library help with that?

@fasiha
Copy link
Owner Author

fasiha commented May 24, 2019

(I misread the issue number in the above commits—I haven't made any commits addressing this issue.)

One issue with rebalancing keys in a key-value databaes is, the database will have to be locked to outside writes during rebalancing keys, to prevent an application writing a new key while existing keys are being shifted.

E.g., if you had keys '9' and '99', and a not-yet-extant rebalancing module advised you to move '99' to '91', and that move happened at the exact same time that an application inserted a new document with key '95' between these two existing keys, the documents will have incorrect ordering.

Having to lock the database during rebalancing, either wholly or parts of the keyspace (is this even possible?), makes rebalancing a very inelegant activity 😢.

@dearlordylord
Copy link

You probably already know that but will leave here just in case someone stumbles on this issue. https://youtu.be/OjQv9xMoFbg They do 3 buckets trick to overcome this it seems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants