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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add batch put command #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rfyiamcool
Copy link
Contributor

change

add batch put command. 馃榿

@akrylysov
Copy link
Owner

Thanks for the contribution. Is it just some syntactic sugar for the existing Put? This implementation doesn't improve the performance, you save a bit on acquiring the mutex only once per batch, but on the other hand it may cause issues for reads if the mutex is held for too long when inserting a large number of keys.

@rfyiamcool
Copy link
Contributor Author

Thanks for the contribution. Is it just some syntactic sugar for the existing Put? This implementation doesn't improve the performance, you save a bit on acquiring the mutex only once per batch, but on the other hand it may cause issues for reads if the mutex is held for too long when inserting a large number of keys.

Just to reduce the lock time. 馃槄 In local kv read/write case, this optimization seems to have no other benefits.

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

Successfully merging this pull request may close these issues.

None yet

2 participants