Skip to content

[Bug] 事务修复后偶现 Session 无法删除的问题(即使已清空所有外链数据) / Session cannot be deleted occasionally after transaction fix for deadlocks (even after clearing all foreign-linked data) #118

@SunYanbox

Description

@SunYanbox

描述 / Description
在使用事务机制修复多进程数据库死锁问题后,大部分场景下 Session 能够被正确删除。但存在一定概率,某个 Session 即使其所有外键关联的数据(外链数据)都已被手动清空,依然无法被删除操作移除,且不报任何显式错误或仅返回“影响行数为 0”。
After fixing multi-process database deadlocks with transaction mechanisms, most sessions can be deleted correctly. However, with a certain probability, a session remains undeletable even after all its foreign-key-linked data has been manually cleared. The delete operation either fails silently or returns “0 rows affected” without an explicit error.

期望行为 / Expected Behavior
一旦 Session 的所有外链依赖数据被清空,对应的 Session 记录应当能够被正常删除,不应出现一直残留且无法删除的情况。
Once all foreign-key dependent data of a session is cleared, the corresponding session record should be deletable without permanent retention.

实际行为 / Actual Behavior
特定 Session 无法被删除,即使确认其关联的外键表已无任何引用。该 Session 记录依然存在于表中。
A specific session cannot be deleted even after confirming there are no remaining references in foreign-key tables. The session record persists in the table.

After #117

低优先级, 因为此情景出现次数少且难以复现 / Low priority — rare and hard to reproduce

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions