Skip to content

[fix](be) Fix row binlog writer test metadata#65686

Merged
hello-stephen merged 1 commit into
apache:masterfrom
seawinde:fix-row-binlog-be-test-compatibility
Jul 16, 2026
Merged

[fix](be) Fix row binlog writer test metadata#65686
hello-stephen merged 1 commit into
apache:masterfrom
seawinde:fix-row-binlog-be-test-compatibility

Conversation

@seawinde

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: N/A

Related PR: #65076, #65663

Problem Summary:
The master BE unit test target fails to compile because GroupRowsetWriterTest still passes a pointer to allocate_binlog_lsn(), which now accepts a vector reference. After fixing compilation, the suite aborts while flushing row-binlog data.

Root cause: In GroupRowsetWriterTest.SetUp(), two columns are removed from the generated row-binlog schema without updating binlog_tso_idx, binlog_lsn_idx, and binlog_op_idx. RowBinlogSegmentWriter consequently accesses column ID 7 in a seven-column schema. The test output assertions also use the previous LSN, operation, and timestamp layout.

This change initializes the shared LSN vector before passing it by reference, resets the metadata indexes after filtering columns, and verifies TSO, LSN, and operation values using the current schema order and types.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
      • ./run-be-ut.sh -j 20 --run '--filter=GroupRowsetWriterTest.*' (3 tests passed)
    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65076, apache#65663

Problem Summary: The row-binlog writer BE unit test no longer compiles after allocate_binlog_lsn changed to accept a vector reference. After that compile error is fixed, the test aborts because its filtered row-binlog schema retains the metadata indexes from before two hidden columns were removed and its assertions still expect the previous LSN, operation, and timestamp layout. Initialize the LSN vector before passing it by reference, reset the TSO, LSN, and operation indexes after filtering, and verify values using the current metadata order and types.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run '--filter=GroupRowsetWriterTest.*'
- Behavior changed: No
- Does this need documentation: No
@seawinde
seawinde requested a review from gavinchou as a code owner July 16, 2026 05:36
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen

Copy link
Copy Markdown
Contributor

run beut

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor

beut has passed, skip others

@hello-stephen

Copy link
Copy Markdown
Contributor

skip buildall

@hello-stephen
hello-stephen merged commit e40d599 into apache:master Jul 16, 2026
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants