-
Notifications
You must be signed in to change notification settings - Fork 11
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
incorrect behavior when trying to update a field with fieldName #63
Labels
bug
Something isn't working
Comments
ArtDu
added a commit
that referenced
this issue
Nov 22, 2021
We use update/upsert from TarantoolSpace, which updates the space via iproto. To specify the field to update, use fieldName. Previously, if we made a mistake in the name, no error occurred and a request was sent to tarantool where fieldIndex = -1, and this is correct for tarantool because it uses reverse index, so -1 is the last element in the Tuple. For now, we'll throw a TarantoolSpaceFieldNotFoundException if the specified fieldName doesn't exist. Closes #63 Co-authored-by: Vladimir Rogach <v.rogach@corp.mail.ru> Co-authored-by: Oleg Kuznetsov <oleg.kuznetsov@corp.mail.ru
ArtDu
added a commit
that referenced
this issue
Nov 22, 2021
We use update/upsert from TarantoolSpace, which updates the space via iproto. To specify the field to update, use fieldName. Previously, if we made a mistake in the name, no error occurred and a request was sent to tarantool where fieldIndex = -1, and this is correct for tarantool because it uses reverse index, so -1 is the last element in the Tuple. For now, we'll throw a TarantoolSpaceFieldNotFoundException if the specified fieldName doesn't exist. Closes #63 Co-authored-by: Vladimir Rogach <v.rogach@corp.mail.ru> Co-authored-by: Oleg Kuznetsov <oleg.kuznetsov@corp.mail.ru>
ArtDu
added a commit
that referenced
this issue
Nov 22, 2021
We use update/upsert from TarantoolSpace, which updates the space via iproto. To specify the field to update, use fieldName. Previously, if we made a mistake in the name, no error occurred and a request was sent to tarantool where fieldIndex = -1, and this is correct for tarantool because it uses reverse index, so -1 is the last element in the Tuple. For now, we'll throw a TarantoolSpaceFieldNotFoundException if the specified fieldName doesn't exist. Closes #63 Co-authored-by: Vladimir Rogach <v.rogach@corp.mail.ru> Co-authored-by: Oleg Kuznetsov <oleg.kuznetsov@corp.mail.ru>
wey1and
added a commit
that referenced
this issue
Feb 10, 2022
We use update/upsert from TarantoolSpace, which updates the space via iproto. To specify the field to update, use fieldName. Previously, if we made a mistake in the name, no error occurred and a request was sent to tarantool where fieldIndex = -1, and this is correct for tarantool because it uses reverse index, so -1 is the last element in the Tuple. For now, we'll throw a TarantoolSpaceFieldNotFoundException if the specified fieldName doesn't exist. Closes #63 Co-authored-by: Vladimir Rogach <v.rogach@corp.mail.ru> Co-authored-by: Oleg Kuznetsov <oleg.kuznetsov@corp.mail.ru>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Data loss problem. An error is expected in assert, but it updates the last field if the fieldName that is specified in update does not exist:
This line changes fieldId from None to -1:
cartridge-java/src/main/java/io/tarantool/driver/api/space/TarantoolSpace.java
Line 235 in e6f00e0
The text was updated successfully, but these errors were encountered: