fix: Fix the problem of re-logging during the snapshot recovery process (#9401)

This commit is contained in:
ssongliu 2025-07-04 11:59:40 +08:00 committed by GitHub
parent f74248f0d7
commit 4f6f7632f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -237,6 +237,7 @@ func loadDbConn(snap *snapHelper, targetDir string, req dto.SnapshotCreate) erro
if err != nil {
return err
}
_ = os.Remove(path.Join(targetDir, "db/session.db"))
agentDb, err := common.LoadDBConnByPathWithErr(path.Join(targetDir, "db/agent.db"), "agent.db")
snap.Task.LogWithStatus(i18n.GetWithName("SnapNewDB", "agent"), err)