Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This release offers support of several
*_many()
and*_object_many()
operations to insert/replace/upsert many tuples at once.
Those operations are faster for many tuples/operations of the same kind.
Say, if you want to add large amount of data into the cluster, invoke
insert_many()
with 100 (or 1000, depends of the size) tuples per call.Breaking changes
There are no breaking changes in the release.
New features
Insert many tuples/objects at once (Add batch insert/upsert/insert_objects/upsert_objects #193).
Replace many tuples/objects at once (Add batch insert/upsert/insert_objects/upsert_objects #193).
Perform many upsert operations at once (Add batch insert/upsert/insert_objects/upsert_objects #193).
Example:
The
*_many()
operations have almost same options asinsert/replace/upsert and two new ones to control how errors are
interpreted on a storage:
stop_on_error
(boolean
, default isfalse
)If an error occurs on a storage, stop processing operations of the
request on given storage.
Only on the storage, where the error occurs.
rollback_on_error
(boolean
, default isfalse
)Rollback all changes on the storage, where an error occurs.
Only on the storage, where the error occurs.
The operations may succeed partially, so data and errors will be
returned both. Several errors can occur at a single request: those calls
return an array of errors, where each error contains the problematic
tuple/object. Consider the README for the detailed description.
Be ready to errors that are not recoverable without interaction with a
human. This implementation does NOT perform cluster wide transactions or
two phare commit: all rollbacks are made only on particular storage.