-
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
Crud errors after space drop in migrations #308
Comments
+1 If any space dropped - crud 0.10.0+ fails to work with the same error. Seems that there is a problem in triggers on box.space._space |
At the first glance, it seems that the reason is that space is dropped, but its sharding info is not cleaned up. So, as a workaround, I suggest you to do a proper ddl space drop. |
yea, right you are but why not add a check that space was dropped and not take any sharding info into account? It's quite common problem, because ddl and migrations doesn't contain any high level helpers to unregister sharding keys, so nobody do it in real life. |
Before this patch, in case there is a sharding key record in _ddl_sharding_key for a non-existing space (for example, if ddl space wasn't properly dropped) and sharding info needs to be updated, any crud request will fail with "attempt to index a nil value" error. This patch fixes the behavior and adds a log warning if ddl configuration is invalid. Closes #308
Yes, we will definitely fix it in a patch. |
Here is an example of consequences of our API: https://t.me/tarantoolru/188981 User can't clean __ddl_sharding_key and thus can't continue to use crud |
Yeah, I already saw that one. Refer to #310 ticket. Solutions for this issue and #310 one are already prepared. After review, we will merge them to master and publish a bugfix release 0.12.1 (it shouldn't be too long). |
Overview This is a bugfix release. It introduces several fixes related to crud and ddl module integration. Breaking changes There are no breaking changes in the release. Bugfixes * Fetching invalid ddl configuration (sharding key for non-existing space) is no longer breaks CRUD requests (#308, PR #309). * ddl space record delete no more throws error if crud is used (#310, PR #311). * crud sharding metainfo is now updated on ddl record delete (#310, PR #311).
Overview This is a bugfix release. It introduces several fixes related to crud and ddl module integration. Breaking changes There are no breaking changes in the release. Bugfixes * Fetching invalid ddl configuration (sharding key for non-existing space) is no longer breaks CRUD requests (#308, PR #309). * ddl space record delete no more throws error if crud is used (#310, PR #311). * crud sharding metainfo is now updated on ddl record delete (#310, PR #311).
If you call box.space.space_name:drop() in migrations. Then during operations applied to other spaces on crud 0.10.0 and newer an error appears.
If you change crud version to 0.9.0, everything works again.
Reproducer
Error example:
The text was updated successfully, but these errors were encountered: