fix(log): address remaining CodeRabbit suggestions for log database switch and migrations

This commit is contained in:
ryan
2026-08-08 20:36:04 +08:00
parent a6fc2b7737
commit 7d93d3d2a1
5 changed files with 21 additions and 8 deletions
@@ -2250,6 +2250,10 @@ func (h *LogDBSwitchHandler) Execute(ctx context.Context, payload []byte) (*task
}
defer func() { _ = setMigrationFlag(ctx, "") }() // 失败也清除,保持源库可写
if err := drainLogWriters(ctx); err != nil {
return nil, fmt.Errorf("排空日志写入队列失败: %w", err)
}
src, err := logstore.Active(ctx)
if err != nil {
return nil, err