-
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
Take format changes into account when making queries #54
Comments
How actual is this problem in stable running environments? Changing schema leads to necessary changes in code, which rarely changes on-the-fly in the stable system. Consider that in real environments using migrations is recommended for changing the spaces schema, migrations are unlikely to be performed while there are active external connections and, furthermore, active requests to an instance. |
I would take a glance on this after we'll arrange information about currently implemented approach (#253): otherwise it is not easy to keep a clear picture in the mind how the code work. |
Schema reload is already supported in case of format error mismatch. DDL schema is validated in case of update. See more about schema reload work here: https://github.com/tarantool/crud/blob/ddfc25169ca14ebf8e711bc58db93d4d7a0b89a3/doc/dev/schema.md It seems that the things discussed in this ticket are not relevant anymore, but feel free to reopen if it's not. |
It is possible that space format changes during the query (for example, during insert). Then, the user will get format mismatch error.
There are 2 primary cases we need to consider.
Format changes when inserting objects
In this case,
crud.insert_object()
should probably re-pack the object and retry, if the schema is still compatible with the object.Format changes when inserting tuples
This can happen, for example, when the user adds a column on the right. Then there are 2 more cases:
Returning errors
When we return errors about format mismatch, we need to include a specific error type, that will allow connectors to make a decision whether they should retry or not. In many cases, connectors will be written in a way when they accept objects of their host programming language. If this is true, they may want to re-pack the tuple on their side and retry.
The text was updated successfully, but these errors were encountered: