Files
opsxsql/backend/internal
logan b2b13661fd feat: gh-ost 完整策略引擎 — 13项配置+环境差异+云数据库适配+DDL智能分析
配置项(13项):
- ghost_enabled: 全局开关(默认关闭)
- ghost_default_mode: 默认执行模式(dry_run/execute)
- ghost_osc_priority: OSC优先级(native_first/ghost_first/ghost_only)
- ghost_env_mode: 环境模式(development/production)
- ghost_cloud_type: 云数据库类型(self_hosted/aliyun_rds/polardb/aws_aurora)
- ghost_auto_trigger_rows: 自动触发行数阈值(万)
- ghost_auto_trigger_ddl: 自动触发DDL类型
- ghost_path/chunk_size/max_load/critical_load/max_lag_millis/allow_on_master

新增API:
- GET /ghost/config: 查看全部gh-ost配置
- POST /ghost/analyze: DDL智能分析(解析DDL类型+行数检查+策略推荐)
- 云数据库: --aliyun-rds / --aws 自动适配

策略逻辑:
- native_first + development → 推荐Native DDL
- native_first + production + DDL匹配 → 推荐gh-ost
- ghost_first/ghost_only → 强制gh-ost
- 行数超阈值 → 额外推荐gh-ost
2026-05-27 00:22:33 +08:00
..