Skip to content

[Bug]: [dev regression] 'internal error: remote receiver 019abb1e-c393-7c0b-ae17-5b4216cb9af4(MsgId=1) is already done, data loss may occur #23153

Closed

Description

@Ariznawlll

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

3.0-dev

Commit ID

80c3916

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

job: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/19664973954/job/56337870790

Image

集群监控:https://grafana.cn-dev.matrixone.tech/d/cluster-detail-v2/cluster-detail-v2?orgId=1&from=1764086446000&to=1764097246000

log: https://grafana.cn-dev.matrixone.tech/explore?panes=%7B%22yL9%22:%7B%22datasource%22:%22cbb7c841-137c-4165-b7c9-61d57c8ff571%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bmatrixorigin_io_namespace%3D%5C%22freetier-01%5C%22,%20matrixorigin_io_component%3D%5C%22CNSet%5C%22%7D%20%7C%3D%20%60data%20loss%20may%20occur%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22cbb7c841-137c-4165-b7c9-61d57c8ff571%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%221764087051000%22,%22to%22:%221764100851000%22%7D%7D%7D&schemaVersion=1&orgId=1

sql:
SELECT t1.caculate_h, t1.change_rate, t1.change, t1.deep, t1.pro_survey_point_id, t2.nameAS surveyPointName FROMsctc-ls.pro_survey_data t1 LEFT JOIN sctc-ls.pro_survey_point t2 ON t1.pro_survey_point_id = t2.id WHERE t1.del_flag = '0' AND ( t1.pro_survey_point_id, t1.number ) IN (SELECT pd.pro_survey_point_id, max( pd.number ) FROMsctc-ls.pro_survey_data pd LEFT JOIN sctc-ls.pro_survey_point pp ON pp.id = pd.pro_survey_point_id LEFT JOIN sctc-ls.pro_monitor_item_warning pw ON pw.id = pp.data_warning_id WHERE pp.del_flag = '0' AND pd.del_flag = '0' AND pd.audit_state = 2 AND pw.id = 14435 AND pd.survey_time < '2022-07-21 12:00:00' GROUP BY pd.pro_survey_point_id );

Expected Behavior

No response

Steps to Reproduce

trigger dev test workflow

Additional information

No response

Activity

  1. added this to the MO-202511 milestone on Nov 26, 2025
  2. added theissue type on Nov 26, 2025
  3. added
    kind/bug
    severity/s0
    on Nov 26, 2025
  4. LeftHandCold commented on Nov 26, 2025

    @LeftHandCold
    Collaborator

    问题根本原因

    这是一个逻辑错误:StopSending 消息被错误地用来取消 dispatch receiver。

    执行流程

    1. 主查询发送子查询到远程节点

      • 创建多个 dispatch receiver,它们可能共享相同的 streamID(但不同的 session)
      • 每个 receiver 通过 RecordDispatchPipeline 注册
    2. 子查询执行完成

      • 子查询执行完成后,sender.close() 被调用
      • close() 发送 Method_StopSending 消息到远程节点
    3. StopSending 消息处理

      • 远程节点收到 StopSending 消息,调用 CancelPipelineSending
      • 错误:CancelPipelineSending 调用了 cancelPipeline(),对于 dispatch receiver 设置了 ReceiverDone=true
      • 这导致 dispatch receiver 被错误地标记为 done
    4. 发送数据时报错

      • 当主查询尝试发送数据到 dispatch receiver 时
      • 发现 ReceiverDone=true,在 strict 模式下返回错误

    关键问题

    StopSending 消息的用途:

    • StopSending 消息是用来停止发送数据的
    • 它不应该影响接收数据的 dispatch receiver
    • Dispatch receiver 应该继续接收数据,直到数据发送完成

    错误的逻辑:

    • CancelPipelineSending 对 dispatch receiver 调用了 cancelPipeline()
    • cancelPipeline() 设置了 receiver.ReceiverDone = true
    • 这导致 dispatch receiver 被错误地标记为 done
  5. XuPeng-SH commented on Nov 28, 2025

    @XuPeng-SH
    Contributor

    please help to verify with the latest dev @Ariznawlll

  6. Ariznawlll commented on Dec 2, 2025

    @Ariznawlll
    CollaboratorAuthor

    测试通过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions