Skip to content

eventcollector: account for remote BatchDMLEvent row payload size #5959

Description

@wlwilliamx

What did you do?

Receive BatchDMLEvent instances from a remote event service. The event
collector pushes each deserialized event into dynamic stream before calling
AssembleRows.

What did you expect to see?

BatchDMLEvent.GetSize should include the encoded row payload so dynamic
stream memory control and byte-based batching reflect the actual event size.

What did you see instead?

Deserialization stores the encoded rows in RawRows and leaves Rows nil.
However, GetSize only calls Rows.MemoryUsage, which returns zero in this
state.

As a result, dynamic stream undercounts pending memory for remote DML batches,
and byte-based batching may continue until the event-count hard limit instead
of stopping near the configured byte limit.

This is related to #3237, which introduced byte-based dynamic stream batching.

Versions of the cluster

Upstream TiDB cluster version:

Not applicable

Upstream TiKV version:

Not applicable

TiCDC version:

master at 32152380dfa06d646cfdc54ad1bab2c32921de5d

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions