Skip to content

bug: ReadRows kills ydb-local #15701

@KirillKurdyukov

Description

@KirillKurdyukov

To fix this issue, it is necessary to change the current behavior of ReadRows.
The root cause is that ReadRows does not properly handle nullable columns: nullable types in table schema become not-nullable in ReadRows response. That causes ydbd crashes in case of nulls in table data.

repro

CREATE TABLE issues ( id UUID NOT NULL, title Text, created_at Timestamp, author Text, PRIMARY KEY (id) ); 

Sending proto:

session_id: "ydb://session/3?node_id=1&id=OGYyOWJlOWYtOWYyY2Q3YWMtY2UwYWVjOTEtZTllOGRlZmY=" path: "/local/issues" keys { type { list_type { item { struct_type { members { name: "id" type { type_id: UUID } } } } } } value { items { items { low_128: 5401043504824218602 high_128: 8045957451189022117 } } } } 

last logs:

2025-03-13T12:59:53.469553Z :FLAT_TX_SCHEMESHARD NOTICE: Publication complete, notify & remove, at schemeshard: 72075186232723360, txId: 281474976710668, subscribers: 1 2025-03-13T12:59:54.069107Z :READ_TABLE_API NOTICE: [1:7481278092023663194:2485] Finish grpc stream, status: 400000 2025-03-13T12:59:54.149576Z :RPC_REQUEST ERROR: TReadRowsRPC ReplyWithError: no keys are found in request's proto VERIFY failed (2025-03-13T12:59:54.240681Z): AsValue<T>() type size 8 doesn't match TCell size 0 ydb/core/scheme/scheme_tablecell.h:170 AsValue(): requirement sizeof(T) == Size() failed ??+0 (0x912F72C) ??+0 (0x912AF8C) ??+0 (0xC15585C) ??+0 (0x12D7C120) ??+0 (0x12D7B811) ??+0 (0x12D7E1C1) ??+0 (0x12D7B3F9) ??+0 (0x9BF4B36) ??+0 (0x9BF83F2) ??+0 (0x9BF8041) ??+0 (0x9BF8B53) ??+0 (0x91330C8) ??+0 (0x40008EBAC3) clone+68 (0x400097CA04) 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions