crud: fix explicit bucket_id in *_many operations#438
Merged
DifferentialOrange merged 1 commit intomasterfrom May 20, 2024
Merged
crud: fix explicit bucket_id in *_many operations#438DifferentialOrange merged 1 commit intomasterfrom
DifferentialOrange merged 1 commit intomasterfrom
Conversation
In case `insert_many`, `insert_object_many`, `replace_many`, `replace_object_many`, `upsert_many` or `upsert_object_many` has been called on a space with custom sharding info and every tuple/object in the request had `bucket_id`, `ShardingHashMismatchError` has been returned even though there are no issues with sharding info. For example, some users met this issue while working with tt-ee `tt crud import` command. The reason is as follows. To ensure sharding info consistency between the storage and the router, some metainfo is calculated for a request in case bucket_id is generated. In case no bucket_id is generated, no sharding info is passed and consistency check is skipped (since it is not needed). Before this patch, `*_many` operations haven't skipped consistency check when it was expected due to improper `skip_sharding_hash_check` flag setup. Closes #437
cfa496d to
9c1b02e
Compare
better0fdead
approved these changes
May 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In case
insert_many,insert_object_many,replace_many,replace_object_many,upsert_manyorupsert_object_manyhas been called on a space with custom sharding info and every tuple/object in the request hadbucket_id,ShardingHashMismatchErrorhas been returned even though there are no issues with sharding info. For example, some users met this issue while working with tt-eett crud importcommand.The reason is as follows. To ensure sharding info consistency between the storage and the router, some metainfo is calculated for a request in case bucket_id is generated. In case no bucket_id is generated, no sharding info is passed and consistency check is skipped (since it is not needed). Before this patch,
*_manyoperations haven't skipped consistency check when it was expected due to improperskip_sharding_hash_checkflag setup.Closes #437
I didn't forget about