Skip to content

fix(editor): 删除项目和账户时清理词库 / clean deleted vocabulary scopes - #791

Merged
zeweihan merged 1 commit into
masterfrom
codex/fix-completion-cleanup-538
Sep 9, 2026
Merged

fix(editor): 删除项目和账户时清理词库 / clean deleted vocabulary scopes#791
zeweihan merged 1 commit into
masterfrom
codex/fix-completion-cleanup-538

Conversation

@zeweihan

@zeweihan zeweihan commented Sep 9, 2026

Copy link
Copy Markdown
Owner

新词库使用 scope_key,不在既有按 projectId/userId 清理的表集合中,删除项目或注销账户后会遗留已学习记录。现在两条删除路径先取得与学习操作相同的父行写锁,再精确清理本范围词库,防止并发写入留下孤儿。账户注销仍须官网传导成功后才清理本地数据。

The learned vocabulary uses scope_key and was omitted from existing project/account cleanup. Acquire the same parent-row write lock used by learning, then delete only the matching scope, preventing concurrent learning from leaving orphan records. Account cleanup still starts only after unified-account deletion succeeds.

验证 / Validation: JDK 21 compile and ProjectDeleteCascadeTest/AccountDeletionServiceTest pass. Real H2 test confirms deleting one project preserves another project's and personal entries; account tests verify lock→vocabulary→user deletion order and zero vocabulary deletion when upstream account deletion fails.

Follow-up to #784; dev-board#538. No new dependencies or schema changes.

@zeweihan
zeweihan merged commit 761aea6 into master Sep 9, 2026
9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant