diff --git a/docs/developer_guides/chap08_binlog.md b/docs/developer_guides/chap08_binlog.md index 654739a604737..04ca8ce593bd1 100644 --- a/docs/developer_guides/chap08_binlog.md +++ b/docs/developer_guides/chap08_binlog.md @@ -54,11 +54,11 @@ Binlog file consists of 4 bytes magic number and a series of events. The first e | +----------------------------+---------------------------------------------------------------------+ | | PayloadDataType 65 : 4 | data type of payload | | +----------------------------+---------------------------------------------------------------------+ +| | PostHeaderLengths n : n | header lengths for all event types | +| +----------------------------+---------------------------------------------------------------------+ | | ExtraLength 69 : 4 | length of extra information | | +----------------------------+---------------------------------------------------------------------+ | | ExtraBytes 73 : n | extra information in json format | -| +----------------------------+---------------------------------------------------------------------+ -| | PostHeaderLengths n : n | header lengths for all event types | +=====================================+=====================================================================| ``` diff --git a/internal/storage/data_codec.go b/internal/storage/data_codec.go index 0794c17a2ccba..237582a3a5792 100644 --- a/internal/storage/data_codec.go +++ b/internal/storage/data_codec.go @@ -286,6 +286,7 @@ func (insertCodec *InsertCodec) Serialize(partitionID UniqueID, segmentID Unique startTs := ts[0] endTs := ts[len(ts)-1] + // sort insert data by rowID dataSorter := &DataSorter{ InsertCodec: insertCodec, InsertData: data,