Skip to content

[Bug]: self-referencing FK UPDATE returns context canceled instead of constraint error on 4.2-dev #32560

Closed

Description

@ck89119

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Related: closed #27524 documents FK errors replaced by sibling cancellation for distributed INSERT SELECT on main. This report concerns UPDATE on 4.2-dev; whether it shares that root cause or lacks a related backport remains to be established.

Branch Name

4.2-dev (CI for PR #32541)

Commit ID

0cc3f6f

Other Environment Information

Actual Behavior

test/distributed/cases/foreign_key/fk_self_refer2.sql, row 280:

update t1 set b = 2 where a = 1;

At 2026-11-11 10:26:09 UTC the tester reports:

  • Expected: Cannot delete or update a parent row: a foreign key constraint fails
  • Actual: internal error: context canceled

The case completes with 101 statements, 100 successes, and this single failure. The entire PESSIMISTIC group has one failed statement; coverage publication/CI Required are subsequently blocked by the BVT failure.

Expected Behavior

Return the specific FK constraint error. Cancellation used to stop sibling execution must not obscure the primary error. Preserve the existing BVT assertion.

Steps to Reproduce

Run the complete existing test/distributed/cases/foreign_key/fk_self_refer2.sql under multi-CN PESSIMISTIC configuration and inspect the UPDATE at row 280 after its original setup.

This failure was observed in the linked CI; no clean multi-CN baseline reproduction or frequency measurement was performed in this investigation.

Additional information

The failing UPDATE has no CTE and does not enter PR #32541's new SELECT/ordinary INSERT source-reuse paths. Its new CTE BVT passes 35/35; UT and SCA also pass. Keep distributed error-priority analysis separate from the CTE patch. Similarity to #27524 is supporting context, not proof of the exact cause.

Activity

  1. added
    kind/bug
    on Nov 11, 2026
  2. added a commit that references this issue on Nov 12, 2026
    db0a7e7
  3. XuPeng-SH commented on Nov 19, 2026

    @XuPeng-SH
    Contributor

    Closure evidence: fixed by #32558 (db0a7e7, merged to 4.2-dev 2026-11-12). The causal foreign-key error is preserved when sibling JoinMap cancellation propagates through local and remote execution, instead of surfacing internal error: context canceled.

    Original reproducer re-verified on 4.2-dev CI: test/distributed/cases/foreign_key/fk_self_refer2.sql ran in the multi-CN COMPOSE PESSIMISTIC BVT lane (run 44260593735, job 134659515228, 2026-11-18) with 101/101 statements successful and 0 failed; the previously failing update t1 set b = 2 where a = 1 (row 280) now returns the FK constraint error. db0a7e7 is an ancestor of the current 4.2-dev head 71e2233.

    Reopen if the cancellation-masking pattern recurs.

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

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions