tarantool / crud

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

schema: fix stale schema for metadata generation #359

Closed GRISHNOV closed 1 year ago

GRISHNOV commented 1 year ago

Corrects using of an stale schema to generate metadata during crud.update, crud.insert, crud.insert_*, crud.replace, crud.replace_*, crud.upsert, crud.upsert_*, crud.delete, crud.max, crud.min, crud.select,crud.pairs, crud.get working.

If the implemented fetch_latest_metadata option is used, it is guaranteed that the metadata will be up-to-date. Before receiving the space format, a mismatch check will be performed between the scheme version on all involved storage and the scheme version in the net_box connection of the router. In case of mismatch, the schema reload will be triggered.

Related with #361 Closes #236

GRISHNOV commented 1 year ago

I have changed the approach to fixing the bug: if the solution is suitable, I will check the rest of the crud commands to reproduce this bug. At the moment, without this fix, the bug is also reproduced on insert and insert_object

DifferentialOrange commented 1 year ago

You'll also need to update this developer's doc: https://github.com/tarantool/crud/blob/master/doc/dev/schema.md