Skip to content

[Bug] TopN Lazy Materialization hangs when ORDER BY + LIMIT queries require RowId materialization (4.1.2-rc01) #66365

Description

@yang-666-cn

Search before asking

  • I had searched in the issues and found no similar issues.

Version

Apache Doris
doris-4.1.2-rc01-aec169d2025

What's Wrong?

After upgrading to Apache Doris 4.1.2-rc01, we found that queries using ORDER BY ... LIMIT may hang indefinitely when the query needs to materialize non-key columns.
The problem disappears after disabling TopN Lazy Materialization by setting:
SET GLOBAL experimental_topn_lazy_materialization_threshold = 0;
This suggests the issue is related to the TopN Lazy Materialization / RowId Lookup execution path.

What You Expected?

The query should finish normally.
TopN Lazy Materialization should not hang.

How to Reproduce?

Doris缺陷.docx

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions