feat: DMS↔ODC 用户同步自愈(策略 A+B) - #657
Open
LordofAvernus wants to merge 1 commit into
Open
Conversation
进台缓存未命中时先查后建并冲突兜底;删除用户时清理工作台缓存并对 ODC 用户禁用。 关联 actiontech/dms-ee#948 Co-authored-by: Cursor <cursoragent@cursor.com>
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
关联的 issue
https://github.com/actiontech/dms-ee/issues/948
描述你的变更
确认项(pr提交后操作)
Tip
请在指定复审人之前,确认并完成以下事项,完成后✅
not_compatibleneed_update_docMade with Cursor
Description
增强 DMS 与 ODC 用户同步自愈的双策略机制
策略 A:先查询再创建用户,处理创建冲突并绑定已存在用户
策略 B:删除 DMS 用户时清理 SqlWorkbench 缓存和会话,并对 ODC 用户禁用
新增 ODC 用户操作接口及错误处理,提升系统容错性
Diagram Walkthrough
File Walkthrough
router.go
注入并连接生命周期清理能力internal/apiserver/service/router.go
sql_workbench_client.go
增强 ODC 用户接口与冲突错误处理internal/sql_workbench/client/sql_workbench_client.go
sql_workbench_service.go
重构用户创建、绑定及删除清理逻辑internal/sql_workbench/service/sql_workbench_service.go
user.go
添加用户缓存清理及生命周期接口internal/dms/biz/user.go
sql_workbench.go
添加 SqlWorkbench 缓存删除方法internal/dms/storage/sql_workbench.go