This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f0b8123087 [fix](binlog): fix GroupRowsetWriterTest coredump due to 
incomplete binlog meta setting (#64545)
8f0b8123087 is described below

commit 8f0b8123087f5d6e94e78e4341189dea84be19c9
Author: TsukiokaKogane <[email protected]>
AuthorDate: Tue Jun 16 19:37:53 2026 +0800

    [fix](binlog): fix GroupRowsetWriterTest coredump due to incomplete binlog 
meta setting (#64545)
---
 be/src/storage/segment/row_binlog_segment_writer.cpp | 8 ++++++--
 be/src/storage/tablet/tablet_meta.cpp                | 8 +++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/be/src/storage/segment/row_binlog_segment_writer.cpp 
b/be/src/storage/segment/row_binlog_segment_writer.cpp
index 97a1152a28a..575eb10821c 100644
--- a/be/src/storage/segment/row_binlog_segment_writer.cpp
+++ b/be/src/storage/segment/row_binlog_segment_writer.cpp
@@ -331,8 +331,12 @@ Status RowBinlogSegmentWriter::_fill_binlog_columns(size_t 
num_rows,
         // (SegmentIterator::_update_tso_col_if_needed), so its on-disk value 
is never used.
         // Write a NULL placeholder.
         IColumn* ts_col_ptr = binlog_prefix_columns[2].get();
-        auto* ts_nullable_column = assert_cast<ColumnNullable*>(ts_col_ptr);
-        ts_nullable_column->insert_many_defaults(num_rows); // NULL 
placeholder (value + null map)
+        auto* ts_nullable_column = 
check_and_get_column<ColumnNullable>(ts_col_ptr);
+        if (ts_nullable_column != nullptr) {
+            ts_nullable_column->insert_many_defaults(num_rows);
+        } else {
+            
assert_cast<ColumnInt64*>(ts_col_ptr)->insert_many_defaults(num_rows);
+        }
 
         // finally update null map for op column (timestamp null map set by 
insert_many_defaults)
         for (int i = 0; i < num_rows; i++) {
diff --git a/be/src/storage/tablet/tablet_meta.cpp 
b/be/src/storage/tablet/tablet_meta.cpp
index 22cf6a083bb..b289cda58e7 100644
--- a/be/src/storage/tablet/tablet_meta.cpp
+++ b/be/src/storage/tablet/tablet_meta.cpp
@@ -523,9 +523,15 @@ void TabletMeta::init_schema_from_thrift(const 
TTabletSchema& tablet_schema,
         } else {
             unique_id = col_ordinal_to_unique_id.at(col_ordinal);
         }
-        col_ordinal++;
         init_column_from_tcolumn(unique_id, tcolumn, column);
 
+        if (column->name() == BINLOG_LSN_COL) {
+            tablet_schema_pb->set_binlog_lsn_col_idx(col_ordinal);
+        } else if (column->name() == BINLOG_TIMESTAMP_COL) {
+            tablet_schema_pb->set_binlog_timestamp_col_idx(col_ordinal);
+        }
+        col_ordinal++;
+
         if (column->is_bf_column()) {
             has_bf_columns = true;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to