heguanhui opened a new pull request, #64484: URL: https://github.com/apache/doris/pull/64484
### What problem does this PR solve? Issue Number: [https://github.com/apache/doris/issues/64483](url) Problem Summary: When running `GroupRowsetWriterTest.sub_writer_rollback`, a coredump occurs: F20260613 19:13:27.347458 row_binlog_segment_writer.cpp:69] Check failed: lsn_col_id >= 0 binlog<row> schema missing DORIS_BINLOG_LSN ## Root Cause `TabletMeta::init_schema_from_thrift()` does not set `binlog_lsn_col_idx` and `binlog_timestamp_col_idx` in `TabletSchemaPB` when converting from `TTabletSchema`. As a result, these fields remain -1 after deserialization, causing the CHECK failure. ## Solution Add logic in `init_schema_from_thrift()` to: 1. Detect binlog special columns (`__DORIS_BINLOG_LSN__`, `__DORIS_BINLOG_TIMESTAMP__`) by name 2. Record their column indices 3. Set the corresponding fields in `TabletSchemaPB` Additionally, fix a nullable type mismatch for the timestamp column in `_fill_binlog_columns()` by using `check_and_get_column` instead of `assert_cast`. ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
