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

CRUD 0.11.0 incompatible with old-style apps when bucket_id is defined explicitly #278

Closed
no1seman opened this issue May 5, 2022 · 0 comments · Fixed by #280
Closed
Assignees
Labels
bug Something isn't working customer

Comments

@no1seman
Copy link

no1seman commented May 5, 2022

We have many projects with old-style manner when bucket_id is defined explicitly and in some cases crud 0.11.0 fails with an error.

For example, if crud.upsert_object used got the folowing error:

UpsertError: Failed to call upsert on storage-side: ShardingHashMismatchError: crud: Sharding hash mismatch for space cd_flight. Sharding info will be refreshed after receiving this error. Please retry your request.

On crud 0.10.0 - all works fine.

@DifferentialOrange DifferentialOrange self-assigned this May 5, 2022
@DifferentialOrange DifferentialOrange added bug Something isn't working customer teamE labels May 5, 2022
@no1seman no1seman changed the title CRUD 0.11.0 is incompatible with tarantool/migrations schema definition manner CRUD 0.11.0 incompatible with old-style apps when bucket_id is defined explicitly May 5, 2022
DifferentialOrange added a commit that referenced this issue May 6, 2022
After introducing sharding hash info comparison, requests with ddl and
explicit bucket_id in options started to fail with
"Sharding hash mismatch" error. It affects the following methods:
- insert
- insert_object
- replace
- replace_object
- upsert
- upsert_object
- count
The error was caused by bug: "Sharding hash mismatch" was returned even
though sharding info on router and storage is consistent. It is fixed
now. After this patch, hash comparison is skipped if bucket_id is
provided.

Closes #278
DifferentialOrange added a commit that referenced this issue May 6, 2022
After introducing sharding hash info comparison, requests with ddl and
explicit bucket_id in options started to fail with
"Sharding hash mismatch" error. It affects the following methods:
- insert
- insert_object
- replace
- replace_object
- upsert
- upsert_object
- count
The error was caused by bug: "Sharding hash mismatch" was returned even
though sharding info on router and storage is consistent. It is fixed
now. After this patch, hash comparison is skipped if bucket_id is
provided.

Closes #278
DifferentialOrange added a commit that referenced this issue May 6, 2022
After introducing sharding hash info comparison [1], requests with ddl
and explicit bucket_id in options started to fail with
"Sharding hash mismatch" error. It affected following methods:
- insert
- insert_object
- replace
- replace_object
- upsert
- upsert_object
- count

The situation is as follows. Due to a code mistake, router hasn't passed
a sharding hash with a request if bucket_id was specified. If there was
any ddl information for a space on storage, it has caused a hash
mismatch error. Since sharding info reload couldn't fix broken hash
extraction, request failed after a number of retries. This patch fixes
this behavior by skipping hash comparison if sharding info wasn't used
(we already do it in other methods).

1. #268

Closes #278
DifferentialOrange added a commit that referenced this issue May 6, 2022
After introducing sharding hash info comparison [1], requests with ddl
and explicit bucket_id in options started to fail with
"Sharding hash mismatch" error. It affected following methods:
- insert
- insert_object
- replace
- replace_object
- upsert
- upsert_object
- count

The situation is as follows. Due to a code mistake, router hasn't passed
a sharding hash with a request if bucket_id was specified. If there was
any ddl information for a space on storage, it has caused a hash
mismatch error. Since sharding info reload couldn't fix broken hash
extraction, request failed after a number of retries. This patch fixes
this behavior by skipping hash comparison if sharding info wasn't used
(we already do it in other methods).

1. #268

Closes #278
DifferentialOrange added a commit that referenced this issue May 6, 2022
After introducing sharding hash info comparison [1], requests with ddl
and explicit bucket_id in options started to fail with
"Sharding hash mismatch" error. It affected following methods:
- insert
- insert_object
- replace
- replace_object
- upsert
- upsert_object
- count

The situation is as follows. Due to a code mistake, router hasn't passed
a sharding hash with a request if bucket_id was specified. If there was
any ddl information for a space on storage, it has caused a hash
mismatch error. Since sharding info reload couldn't fix broken hash
extraction, request failed after a number of retries. This patch fixes
this behavior by skipping hash comparison if sharding info wasn't used
(we already do it in other methods).

1. #268

Closes #278
DifferentialOrange added a commit that referenced this issue May 6, 2022
CRUD 0.11.1 fixes critical bug found in #278, so it is recommended
to use it instead of 0.11.0.

Added:
* Make metrics quantile collector tolerated error configurable (#281).

Changed:
* Change metrics quantile collector default tolerated error
  from 1e-2 to 1e-3 (#281).

Fixed:
* Requests no more fail with "Sharding hash mismatch" error
  if ddl set and bucket_id is explicitly specified (#278).
@DifferentialOrange DifferentialOrange mentioned this issue May 6, 2022
1 task
DifferentialOrange added a commit that referenced this issue May 6, 2022
Overview

    This release fixes critical bug introduced in 0.11.0. It is
    recommended to use 0.11.1 instead of 0.11.0.

    It also adds an ability to configure quantile collector tolerated
    error and changes its default value.

Breaking changes

    There are no breaking changes in the release.

New features

    Set quantile collector tolerated error with crud.cfg (#281):

    crud.cfg{ stats_quantile_tolerated_error = 1e-4 }

    Decreasing tolerated error may fix getting `-Inf` values in
    quantiles. Increasing tolerated error may improve performance a bit.

Bugfixes

    Requests no more fail with "Sharding hash mismatch" error
    if ddl set and bucket_id is explicitly specified (#278).
DifferentialOrange added a commit that referenced this issue May 6, 2022
Overview

    This release fixes critical bug introduced in 0.11.0. It is
    recommended to use 0.11.1 instead of 0.11.0.

    It also adds an ability to configure quantile collector tolerated
    error and changes its default value.

Breaking changes

    There are no breaking changes in the release.

New features

    Set quantile collector tolerated error with crud.cfg (#281):

    crud.cfg{ stats_quantile_tolerated_error = 1e-4 }

    Decreasing tolerated error may fix getting `-Inf` values in
    quantiles. Increasing tolerated error may improve performance a bit.

Bugfixes

    Requests no more fail with "Sharding hash mismatch" error
    if ddl set and bucket_id is explicitly specified (#278).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants