You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When fixing the issue #6780 it was decided1 that before_replace triggers should receive a well formed tuple (that is, they check tuple format even before operating on it).
This behaviour change breaks one possible use case, when the user fills in the default values for some fields in before_replace triggers. The field is not nullable, and shouldn't be, but it's value might be set right in the before_replace trigger. Reported in https://jira.vk.team/browse/TNT-711.
I suppose we could check only the primary key presence before and after before_replace calls, but only check the full tuple format after all before_replace triggers are fired. This would allow for a usecase when the user finishes building the tuple in before_replace triggers.
not just the default values, it could be the result of some calculations and part of complex business logic.
it's not about providing default values for space format
When fixing the issue #6780 it was decided1 that
before_replace
triggers should receive a well formed tuple (that is, they check tuple format even before operating on it).This behaviour change breaks one possible use case, when the user fills in the default values for some fields in
before_replace
triggers. The field is not nullable, and shouldn't be, but it's value might be set right in thebefore_replace
trigger. Reported in https://jira.vk.team/browse/TNT-711.How to reproduce:
After some preparations
I expect this to work without errors:
Like it did before 884b3ff:
Possible fix:
I suppose we could check only the primary key presence before and after
before_replace
calls, but only check the full tuple format after allbefore_replace
triggers are fired. This would allow for a usecase when the user finishes building the tuple in before_replace triggers.Footnotes
https://github.com/tarantool/tarantool/issues/6780#issuecomment-1028834339 ↩
The text was updated successfully, but these errors were encountered: