tarantool / crud

Easy assess to data stored in vshard cluster
BSD 2-Clause "Simplified" License
40 stars 14 forks source link

Inconsistent upsert return values #357

Open DifferentialOrange opened 1 year ago

DifferentialOrange commented 1 year ago

Core Tarantool space:upsert API is a specific one: it always return nil in case of success. Following this, crud.upsert and crud.upsert_many responses do not have any tuples data. But they do it different.

crud.upsert success response is { rows = {}, metadata = ... }, while crud.upsert_many is { metadata = ... } (res.rows == nil). This doesn't sound good. And while it's should be rather easy to fix, we should make sure to make a smooth transition for a user through behavior deprecation first.

The other question that may follow this one is "Why do we return metadata if it's never useful?", but it is likely to be resolved by #267.