Skip to content

ER_TUPLE_FOUND message is cropped on large tuples #6166

@rybakit

Description

@rybakit

The extended ER_TUPLE_FOUND message was introduced in d11fb30. However, the change does not take into account that tuples can be large, which can lead to cropping the message in the middle and showing only the old tuple or even half a tuple.

  • OS: MacOS
  • OS Version: 10.15.7
  • Architecture: amd64

Tarantool version: 2.8.1-0-ge2a1ec0c2

Steps to reproduce

#!/usr/bin/env tarantool

s = box.schema.space.create('foo')
s:create_index('primary', {unique = true, parts = {1, 'NUM', 2, 'STR'}})
s:insert{1, string.rep('_', 500)}
s:insert{1, string.rep('_', 500)}

How to run:

Just type tarantool test.lua.

Actual behavior

The "old" tuple is cropped and the "new tuple" part is not displayed.

Expected behavior

Both "old" and "new" tuples are fully displayed.

Ideally, it would be great to be able to access the old tuple from the error object, for example through err.old_tuple, so you don't have to parse the string to get the key of the conflicting tuple.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions