Skip to content

Fix text index mrk file incompatibility - #94494

Merged
CurtizJ merged 5 commits into
ClickHouse:masterfrom
fastio:fix_text_index_mrk_file_compatibility
Jan 19, 2026
Merged

CurtizJ merged 5 commits into
ClickHouse:masterfrom
fastio:fix_text_index_mrk_file_compatibility

Conversation

@fastio

@fastio fastio commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix text index .mrk incompatibility during merges.

When using non-adaptive index_granularity, tables with a text index may hit an incompatibility issue in the inverted index .mrk file format after a merge, which can cause queries to fail. The error looks like:

DB::Exception: Cannot read all marks from file xxx.cmrk, is eof: false, buffer size: 24, file size: 50. (CANNOT_READ_ALL_DATA)

To reproduce the issue, please refer to this link: https://fiddle.clickhouse.com/23f6062c-b87b-4135-bd7a-5eccb5cc4038

Version info

  • Merged into: 26.1.1.668
  • Backported to: 25.12.4.32

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jan 17, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7cf7b5b]

Summary: ❌

job_name test_name status info comment
Bugfix validation (functional tests) failure
02346_text_index_mark_file_compatibility FAIL cidb IGNORED
Check errors failure IGNORED
BuzzHouse (amd_ubsan) error IGNORED

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jan 18, 2026
@CurtizJ CurtizJ self-assigned this Jan 19, 2026
@CurtizJ

CurtizJ commented Jan 19, 2026

Copy link
Copy Markdown
Member

It looks like bugfix validation is broken.

@fastio

fastio commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor Author

It looks like bugfix validation is broken.

Hi @CurtizJ,

Yeah, you're right - this looks like it's broken.

The result inversion logic for BugfixValidation in CHECK_ERRORS stage never executes because results[-1].results is cleared before the loop:

ci/jobs/functional_tests.py L619~637:

# fatal failures found in logs represented as normal test cases
        test_result.extend_sub_results(results[-1].results)
        results[-1].results = []  # ← emptied here.   <-----------

        # invert result status for bugfix validation
        if is_bugfix_validation:
            has_failure = False
            for r in results[-1].results:   # ← empty list, skipped. <------------- 
                r.set_label("xfail")
                if r.status == Result.StatusExtended.FAIL:
                    r.status = Result.StatusExtended.OK
                    has_failure = True   # ← never reached  < ----------------
                elif r.status == Result.StatusExtended.OK:
                    r.status = Result.StatusExtended.FAIL
            if not has_failure:
                print("Failed to reproduce the bug")
                results[-1].set_failed().set_info("Failed to reproduce the bug")
            else:
                results[-1].set_success()

Result: has_failure is always False, so BugfixValidation always fails with "Failed to reproduce the bug" regardless of actual test results.

@rschu1ze rschu1ze added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Jan 19, 2026
@CurtizJ CurtizJ added v25.12-must-backport and removed pr-must-backport Pull request should be backported intentionally. Use this label with great care! labels Jan 19, 2026
@CurtizJ
CurtizJ added this pull request to the merge queue Jan 19, 2026
Merged via the queue into ClickHouse:master with commit 67bab21 Jan 19, 2026
126 of 128 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jan 19, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 19, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jan 19, 2026
CurtizJ added a commit that referenced this pull request Jan 19, 2026
Backport #94494 to 25.12: Fix text index mrk file incompatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v25.12-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants