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

Batch operations #176

Closed
denesterov opened this issue Apr 11, 2019 · 1 comment
Closed

Batch operations #176

denesterov opened this issue Apr 11, 2019 · 1 comment
Assignees
Labels
complicated feature A new functionality router teamS Scaling
Milestone

Comments

@denesterov
Copy link

denesterov commented Apr 11, 2019

Add support for batch operations.

For example we need to update 100k records with different keys.
At the moment there is only one option:

  • split the data by replicaset and then by bucket_id
  • manually call each replicaset, with appropriate data
  • on each replicaset update individual buckets, not to forget to call 'vshard.storage.bucket_refrw' / 'bucket_unrefrw'.
  • take care of situation when bucket was moved during operation

It would be reasonable to have that functionality in vshard. A call like that:

vshard.batch_write(data, storage_write_func_name)
where 'data' is a map of key -> record and specified storage functions takes single 'data' element as argument and stores it.

and a similar call like that:
vshard.batch_read(data, storage_read_func_name)

@Gerold103
Copy link
Collaborator

Fixed in #491.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complicated feature A new functionality router teamS Scaling
Projects
None yet
Development

No branches or pull requests

3 participants