fix(backup): 使用ConvertProtoBackupStrategyToDriver替代String()转换备份策略 #2779#3283
Open
LordofAvernus wants to merge 1 commit intomainfrom
Open
fix(backup): 使用ConvertProtoBackupStrategyToDriver替代String()转换备份策略 #2779#3283LordofAvernus wants to merge 1 commit intomainfrom
LordofAvernus wants to merge 1 commit intomainfrom
Conversation
…() for backup strategy The gRPC server's Backup() method was using req.BackupStrategy.String() which returns the proto enum name "OriginalRow" (PascalCase), but the plugin's Backup() expects "original_row" (snake_case). This caused "不支持的备份类型: OriginalRow, 未执行备份" errors when executing backup for DELETE/UPDATE statements on TiDB data sources. Fix: use the existing ConvertProtoBackupStrategyToDriver() function which correctly maps proto enum values to driver string constants. Fixes: BUG-004
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
Summary
Fixes https://github.com/actiontech/sqle-ee/issues/2779
Description
修正备份策略转换逻辑
使用 ConvertProtoBackupStrategyToDriver 函数进行转换
确保 proto 枚举值正确映射到 driver 字符串
Diagram Walkthrough
File Walkthrough
driver_grpc_server.go
使用转换函数替换原有备份策略转换方式sqle/driver/v2/driver_grpc_server.go
ConvertProtoBackupStrategyToDriver(req.BackupStrategy)