-
Notifications
You must be signed in to change notification settings - Fork 14
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
schema: fix stale schema for metadata generation #359
schema: fix stale schema for metadata generation #359
Conversation
update
stale schema for metadata generation
30fc186
to
b17c8be
Compare
9d64371
to
677175d
Compare
ba40695
to
cc4ca93
Compare
I have changed the approach to fixing the bug: if the solution is suitable, I will check the rest of the crud commands to reproduce this bug. At the moment, without this fix, the bug is also reproduced on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for finding the issue. Let's just fail on each schema mismatch and pass the reload procedure to the existing wrapper.
You'll also need to update this developer's doc: https://github.com/tarantool/crud/blob/master/doc/dev/schema.md |
ad43076
to
3ee046b
Compare
3ee046b
to
44c2a64
Compare
d0b58e7
to
1193b03
Compare
aaa36ad
to
f6b4455
Compare
77d39f6
to
1a895f8
Compare
Implemented the `nil` check for primary index parts fetching when `opts.bucket_id` is not set.
b128819
to
ba0f534
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your patch! Seems satisfying, let's improve descriptions a little bit and merge it.
doc/dev/schema.md
Outdated
@@ -92,6 +92,9 @@ Retry with reload is triggered | |||
- ``bucket_id`` calculation has failed due to any reason; | |||
- if updating by field name is not supported natively and id resolve | |||
has failed; | |||
- conditionally if the flag `fetch_latest_metadata` for DML operation that return metadata is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bullet list describes "Retry with reload is triggered" cases, but our one doesn't trigger operation retry. Please, move it to a new section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, moved
7a0ef63
to
b072cd5
Compare
Corrects using of an stale schema to generate metadata for `crud.update`, `crud.insert`, `crud.insert_*`, `crud.replace`, `crud.replace_*`, `crud.upsert`, `crud.upsert_*`, `crud.delete`, `crud.max`, `crud.min`, `crud.select`, `crud.pairs` and `crud.get`. If the implemented `fetch_latest_metadata` option is used, it is guaranteed that the metadata will be up-to-date. Before receiving the space format, a mismatch check will be performed between the scheme version on all involved storage and the scheme version in the net_box connection of the router. In case of mismatch, the schema reload will be triggered. Closes #236
b072cd5
to
c4b037c
Compare
Corrects using of an stale schema to generate metadata during
crud.update
,crud.insert
,crud.insert_*
,crud.replace
,crud.replace_*
,crud.upsert
,crud.upsert_*
,crud.delete
,crud.max
,crud.min
,crud.select
,crud.pairs
,crud.get
working.If the implemented
fetch_latest_metadata
option is used, it is guaranteed that the metadata will be up-to-date. Before receiving the space format, a mismatch check will be performed between the scheme version on all involved storage and the scheme version in the net_box connection of the router. In case of mismatch, the schema reload will be triggered.Related with #361
Closes #236