-
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
Empty error on zero rows input #377
Comments
DifferentialOrange
added a commit
that referenced
this issue
Oct 5, 2023
Before this patch, the behavior of `*_many` requests if empty array of tuples/objects were rather confusing. For example, due to format processing all `*_object_many` operations resulted in `nil, {}` -- error request with zero errors. `insert_many` and `replace_many` calls result in `nil, nil` -- no result, no error. `upsert_many` results in `{metadata = metadata}, nil` with no `rows` in response. Thus, for all six `*_many` calls trying to execute the request with empty array on input result in malformed response. After this patch, trying to run `*_many` request with empty array of tuples/objects will result in `nil, {err}`, similar to existing `*_many` API. Single tuple crud API already does not allow to run with no tuples/objects. Closes #377
DifferentialOrange
added a commit
that referenced
this issue
Oct 5, 2023
Before this patch, the behavior of `*_many` requests if empty array of tuples/objects were rather confusing. For example, due to format processing all `*_object_many` operations resulted in `nil, {}` -- error request with zero errors. `insert_many` and `replace_many` calls result in `nil, nil` -- no result, no error. `upsert_many` results in `{metadata = metadata}, nil` with no `rows` in response. Thus, for all six `*_many` calls trying to execute the request with empty array on input result in malformed response. After this patch, trying to run `*_many` request with empty array of tuples/objects will result in `nil, {err}`, similar to existing `*_many` API. Single tuple crud API already does not allow to run with no tuples/objects. Closes #377
DifferentialOrange
added a commit
that referenced
this issue
Oct 5, 2023
Before this patch, the behavior of `*_many` requests if empty array of tuples/objects were rather confusing. For example, due to format processing all `*_object_many` operations resulted in `nil, {}` -- error request with zero errors. `insert_many` and `replace_many` calls result in `nil, nil` -- no result, no error. `upsert_many` results in `{metadata = metadata}, nil` with no `rows` in response. Thus, for all six `*_many` calls trying to execute the request with empty array on input result in malformed response. After this patch, trying to run `*_many` request with empty array of tuples/objects will result in `nil, {err}`, similar to existing `*_many` API. Single tuple crud API already does not allow to run with no tuples/objects. Closes #377
DifferentialOrange
added a commit
that referenced
this issue
Oct 9, 2023
Before this patch, the behavior of `*_many` requests if empty array of tuples/objects were rather confusing. For example, due to format processing all `*_object_many` operations resulted in `nil, {}` -- error request with zero errors. `insert_many` and `replace_many` calls result in `nil, nil` -- no result, no error. `upsert_many` results in `{metadata = metadata}, nil` with no `rows` in response. Thus, for all six `*_many` calls trying to execute the request with empty array on input result in malformed response. After this patch, trying to run `*_many` request with empty array of tuples/objects will result in `nil, {err}`, similar to existing `*_many` API. Single tuple crud API already does not allow to run with no tuples/objects. Closes #377
DifferentialOrange
added a commit
that referenced
this issue
Oct 9, 2023
Before this patch, the behavior of `*_many` requests if empty array of tuples/objects were rather confusing. For example, due to format processing all `*_object_many` operations resulted in `nil, {}` -- error request with zero errors. `insert_many` and `replace_many` calls result in `nil, nil` -- no result, no error. `upsert_many` results in `{metadata = metadata}, nil` with no `rows` in response. Thus, for all six `*_many` calls trying to execute the request with empty array on input result in malformed response. After this patch, trying to run `*_many` request with empty array of tuples/objects will result in `nil, {err}`, similar to existing `*_many` API. Single tuple crud API already does not allow to run with no tuples/objects. Closes #377
DifferentialOrange
added a commit
that referenced
this issue
Oct 10, 2023
Before this patch, the behavior of `*_many` requests if empty array of tuples/objects were rather confusing. For example, due to format processing all `*_object_many` operations resulted in `nil, {}` -- error request with zero errors. `insert_many` and `replace_many` calls result in `nil, nil` -- no result, no error. `upsert_many` results in `{metadata = metadata}, nil` with no `rows` in response. Thus, for all six `*_many` calls trying to execute the request with empty array on input result in malformed response. After this patch, trying to run `*_many` request with empty array of tuples/objects will result in `nil, {err}`, similar to existing `*_many` API. Single tuple crud API already does not allow to run with no tuples/objects. Closes #377
DifferentialOrange
added a commit
that referenced
this issue
Oct 16, 2023
Overview This release improves experience for VShard clusters users and Tarantool 3 users. It also introduces schema introspection API. New features * Space schema introspection API `crud.schema` (#380). Bugfixes * Return explicit error for `*_many` call with no tuples/objects (#377). * `crud.readview` resource cleanup on garbage collect (#379). * VShard storage user have not execution rights for internal functions (#366). Infrastructure * `deps.sh` installs the `vshard` instead of the `cartridge` by default (#364). You could to specify an environment variable `CARTIRDGE_VERSION` to install the `cartridge` and run tests cases with it. * `doc/playground.lua` does not work with Tarantool 3 (#371). * Tests with Tarantool 3 (#364). * Quickstart section in the README.md focuses on usage with `vshard` instead of `Cartridge` (#366).
Merged
DifferentialOrange
added a commit
that referenced
this issue
Oct 16, 2023
Overview This release improves experience for VShard clusters users and Tarantool 3 users. It also introduces schema introspection API. New features * Space schema introspection API `crud.schema` (#380). Bugfixes * Return explicit error for `*_many` call with no tuples/objects (#377). * `crud.readview` resource cleanup on garbage collect (#379). * VShard storage user have not execution rights for internal functions (#366). * Compatibility with Tarantool 3.0 tuple objects (#387). Infrastructure * `deps.sh` installs the `vshard` instead of the `cartridge` by default (#364). You could to specify an environment variable `CARTIRDGE_VERSION` to install the `cartridge` and run tests cases with it. * `doc/playground.lua` does not work with Tarantool 3 (#371). * Tests with Tarantool 3 (#364). * Quickstart section in the README.md focuses on usage with `vshard` instead of `Cartridge` (#366).
DifferentialOrange
added a commit
that referenced
this issue
Oct 16, 2023
Overview This release improves experience for VShard clusters users and Tarantool 3 users. It also introduces schema introspection API. New features * Space schema introspection API `crud.schema` (#380). Bugfixes * Return explicit error for `*_many` call with no tuples/objects (#377). * `crud.readview` resource cleanup on garbage collect (#379). * VShard storage user have not execution rights for internal functions (#366). * Compatibility with Tarantool 3.0 tuple objects (#387). Infrastructure * `deps.sh` installs the `vshard` instead of the `cartridge` by default (#364). You could to specify an environment variable `CARTIRDGE_VERSION` to install the `cartridge` and run tests cases with it. * `doc/playground.lua` does not work with Tarantool 3 (#371). * Tests with Tarantool 3 (#364). * Quickstart section in the README.md focuses on usage with `vshard` instead of `Cartridge` (#366).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If an empty array is passed as argument, result is
nil, errs
, yeterrs
is an empty array.The case may seem synthetic at the first glance, but it is rather easy to get into such situation while calling CRUD from
go-tarantool
and spend a couple of hours trying to explore what went wrong when error is non-nil, yet empty.The text was updated successfully, but these errors were encountered: