Duplicate key exists in unique index "primary" in space "_space" with old tuple
Prerequisites:
- Picostress
- Picodata with 2 instances
- eduejd.yml scenario file with large amount of table schemas
- Mac M1 Macos Monterey 12.5.1
After running picostress utility with command:
yarn build:run -e path=../scenario/eduejd.yml -e reqs=100 -e clients=localhost:3301,localhost:3302
Picodata raises an error:
2023-11-15 11:49:04.382 [91399] main/112/governor_loop mod.rs:467 E> failed to apply schema
change on instance: tarantool error: TupleFound: Duplicate key exists in unique index "primary"
in space "_space" with old tuple - [1029, 0, "_sql_query", "memtx", 0, {"temporary": true},
[{"is_nullable": false, "name": "query_id", "type": "string"}, {"is_nullable": false, "name":
"query_text", "type": "string"}, {"is_nullable": false, "name": "ref_counter", "type":
"unsigned"}]] and new tuple - [1029, 1, "eduejd_classes_periods", "memtx", 0, {},
[{"is_nullable": false, "name": "diary_url", "type": "string"}, {"is_nullable": false, "name":a: "send_datetime, instance_id: i2
Update 23 nov:
2023-11-23 11:53:38.186 [70753] main/157/.proc_apply_schema_change ddl_apply.rs:59 W> schema change
aborted: tarantool error: TupleFound: Duplicate key exists in unique index "primary" in space "_space" with
old tuple - [1034, 0, "_sql_query", "memtx", 0, {"temporary": true}, [{"is_nullable": false, "name":
"query_id", "type": "string"}, {"is_nullable": false, "name": "query_text", "type": "string"},
{"is_nullable": false, "name": "ref_counter", "type": "unsigned"}]] and new tuple - [1034, 1,
"eduejd_statsubject", "memtx", 0, {}, [{"is_nullable": false, "name": "send_datetime",
"type": "unsigned"}, {"is_nullable": false, "name": "create_date
2023-11-23 11:53:38.186 [70753] main/112/governor_loop mod.rs:420 E> failed to apply schema change on
instance: tarantool error: TupleFound: Duplicate key exists in unique index "primary" in space "_space"
with old tuple - [1034, 0, "_sql_query", "memtx", 0, {"temporary": true}, [{"is_nullable": false, "name":
"query_id", "type": "string"}, {"is_nullable": false, "name": "query_text", "type": "string"},
{"is_nullable": false, "name": "ref_counter", "type": "unsigned"}]] and new tuple - [1034, 1,
"eduejd_statsubject", "memtx", 0, {}, [{"is_nullable": false, "name": "send_datetime", "type": "unsigned"},
{"is_nullable": false, "name": "create_date, instance_id: i1
2023-11-23 11:53:38.186 [70753] main/112/governor_loop I> finalizing schema change, op: DdlAbort
The error occurs regardless of the data, at a random moment of time.