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
*_many operation provides operation_data with each error so it would be possible to
track which exact record had been failed and
retry failed records afterward.
But operation_data that may be returned is inconsistent, may lose some info or contain additional values that may change the behavior (like bucket_id).
./doc/playground.lua
tarantool>crud.insert_many('customers', {{'asd'}})
----null--line: 58class_name: CallErrorerr: 'Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returned an error:Tuplefield1 (id) typedoesnotmatchonerequiredbyoperation: expectedunsigned,
gotstring'file: '.../crud/crud/common/map_call_cases/batch_postprocessor.lua'stack: "stack traceback:\n\t.../crud/crud/common/map_call_cases/batch_postprocessor.lua:58:infunction 'collect'\n\t...y/Development/github/tarantool/crud/crud/common/call.lua:132:infunction 'map'\n\t...y/Development/github/tarantool/crud/crud/insert_many.lua:179:infunction 'method'\n\t...ment/github/tarantool/crud/crud/common/sharding/init.lua:148:infunction 'func'\n\t...Development/github/tarantool/crud/crud/common/schema.lua:93:infunction <...Development/github/tarantool/crud/crud/common/schema.lua:88>\n\t[C]:
infunction 'pcall'\n\tbuiltin/box/console.lua:415: in function 'eval'\n\tbuiltin/box/console.lua:754:infunction 'repl'\n\tbuiltin/box/console.lua:805: in function 'start'\n\t./doc/playground.lua:153:inmainchunk"operation_data: ['asd', 1550]
str: 'CallError: Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returnedanerror: Tuplefield1 (id) typedoesnotmatchonerequiredbyoperation:
expectedunsigned, gotstring'...
Operation data for ['asd'] is ['asd', 1550].
tarantool>crud.insert_object_many('customers', {{id='asd'}})
2023-11-1017:17:50.891 [1571729] main/103/playground.lua/crud.common.schemaschema.lua:108W>Numberofattemptstoreloadschemahasbeenended: 1----null--line: 314class_name: InsertManyErrorerr: 'Failed to flatten object: FlattenError: Object is specified in bad format:FlattenError: Field"name" isn''tnullable (setskip_nullability_check_on_flattenoptiontotruetoskipcheck)'file: '...y/Development/github/tarantool/crud/crud/insert_many.lua'operation_data:
id: asdstr: 'InsertManyError: Failed to flatten object: FlattenError: Object is specifiedinbadformat: FlattenError: Field"name" isn''tnullable (setskip_nullability_check_on_flattenoptiontotruetoskipcheck)'...
Operation data for {id = 'asd'} is {id = 'asd'}.
tarantool>crud.insert_object_many('customers', {{id='asd', name='asd', age=2}})
2023-11-1017:20:02.788 [1571729] main/103/playground.lua/crud.common.schemaschema.lua:108W>Numberofattemptstoreloadschemahasbeenended: 1----null--line: 58class_name: CallErrorspace_schema_hash: 247485528err: 'Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returned an error:Tuplefield1 (id) typedoesnotmatchonerequiredbyoperation: expectedunsigned,
gotstring'file: '.../crud/crud/common/map_call_cases/batch_postprocessor.lua'stack: "stack traceback:\n\t.../crud/crud/common/map_call_cases/batch_postprocessor.lua:58:infunction 'collect'\n\t...y/Development/github/tarantool/crud/crud/common/call.lua:132:infunction 'map'\n\t...y/Development/github/tarantool/crud/crud/insert_many.lua:179:infunction 'method'\n\t...ment/github/tarantool/crud/crud/common/sharding/init.lua:148:infunction 'func'\n\t...Development/github/tarantool/crud/crud/common/schema.lua:93:infunction 'wrap_func_reload'\n\t...y/Development/github/tarantool/crud/crud/insert_many.lua:331:infunction <...y/Development/github/tarantool/crud/crud/insert_many.lua:280>\n\t[C]:
infunction 'pcall'\n\tbuiltin/box/console.lua:415: in function 'eval'\n\tbuiltin/box/console.lua:754:infunction 'repl'\n\tbuiltin/box/console.lua:805: in function 'start'\n\t./doc/playground.lua:153:inmainchunk"operation_data: ['asd', 1550, 'asd', 2]
str: 'CallError: Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returnedanerror: Tuplefield1 (id) typedoesnotmatchonerequiredbyoperation:
expectedunsigned, gotstring'...
Operation data for {id = 'asd', name = 'asd', age = 2} is ['asd', 1550, 'asd', 2].
tarantool>crud.upsert_many('customers', { { {'asd'}, {{'=', 'age', 2}} } })
----null--line: 58class_name: CallErrorerr: 'Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returned an error:Tuplefield1 (id) typedoesnotmatchonerequiredbyoperation: expectedunsigned,
gotstring'file: '.../crud/crud/common/map_call_cases/batch_postprocessor.lua'stack: "stack traceback:\n\t.../crud/crud/common/map_call_cases/batch_postprocessor.lua:58:infunction 'collect'\n\t...y/Development/github/tarantool/crud/crud/common/call.lua:132:infunction 'map'\n\t...y/Development/github/tarantool/crud/crud/upsert_many.lua:193:infunction 'method'\n\t...ment/github/tarantool/crud/crud/common/sharding/init.lua:148:infunction 'func'\n\t...Development/github/tarantool/crud/crud/common/schema.lua:93:infunction <...Development/github/tarantool/crud/crud/common/schema.lua:88>\n\t[C]:
infunction 'pcall'\n\tbuiltin/box/console.lua:415: in function 'eval'\n\tbuiltin/box/console.lua:754:infunction 'repl'\n\tbuiltin/box/console.lua:805: in function 'start'\n\t./doc/playground.lua:153:inmainchunk"operation_data: ['asd', 1550]
str: 'CallError: Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returnedanerror: Tuplefield1 (id) typedoesnotmatchonerequiredbyoperation:
expectedunsigned, gotstring'...
Operation data for { {'asd'}, {{'=', 'age', 2}} } is ['asd', 1550].
tarantool>crud.upsert_many('customers', { { {1, box.NULL, 'name', 2}, {{'=!', 'age', 2}} } })
----null--line: 58class_name: CallErrorerr: 'Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returned an error:UnknownUPDATEoperation#1: "=!"'file: '.../crud/crud/common/map_call_cases/batch_postprocessor.lua'stack: "stack traceback:\n\t.../crud/crud/common/map_call_cases/batch_postprocessor.lua:58:infunction 'collect'\n\t...y/Development/github/tarantool/crud/crud/common/call.lua:132:infunction 'map'\n\t...y/Development/github/tarantool/crud/crud/upsert_many.lua:193:infunction 'method'\n\t...ment/github/tarantool/crud/crud/common/sharding/init.lua:148:infunction 'func'\n\t...Development/github/tarantool/crud/crud/common/schema.lua:93:infunction <...Development/github/tarantool/crud/crud/common/schema.lua:88>\n\t[C]:
infunction 'pcall'\n\tbuiltin/box/console.lua:415: in function 'eval'\n\tbuiltin/box/console.lua:754:infunction 'repl'\n\tbuiltin/box/console.lua:805: in function 'start'\n\t./doc/playground.lua:153:inmainchunk"operation_data: [1, 477, 'name', 2]
str: 'CallError: Failed for 00e44528-9a64-40e1-b180-fb2b14e369f0: Function returnedanerror: UnknownUPDATEoperation#1: "=!"'...
Operation data for { {1, box.NULL, 'name', 2}, {{'=!', 'age', 2}} } is [1, 477, 'name', 2], even though it's update operation that has been failed.
It seems that we need to properly consider the potential usability of operation_data and rework current implementation to satisfy these potentials.
The text was updated successfully, but these errors were encountered:
*_many
operation providesoperation_data
with each error so it would be possible toBut
operation_data
that may be returned is inconsistent, may lose some info or contain additional values that may change the behavior (likebucket_id
).Operation data for
['asd']
is['asd', 1550]
.Operation data for
{id = 'asd'}
is{id = 'asd'}
.Operation data for
{id = 'asd', name = 'asd', age = 2}
is['asd', 1550, 'asd', 2]
.Operation data for
{ {'asd'}, {{'=', 'age', 2}} }
is['asd', 1550]
.Operation data for
{ {1, box.NULL, 'name', 2}, {{'=!', 'age', 2}} }
is[1, 477, 'name', 2]
, even though it's update operation that has been failed.It seems that we need to properly consider the potential usability of
operation_data
and rework current implementation to satisfy these potentials.The text was updated successfully, but these errors were encountered: