You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bklog.L.Errorf("failed to open database file %s, resetting to empty. Old database is backed up to %s. "+
489
+
"This error signifies that buildkitd likely crashed or was sigkilled abrubtly, leaving the database corrupted. "+
490
+
"If you see logs from a previous panic then please report in the issue tracker at https://github.com/moby/buildkit . %+v", dbPath, backupPath, openErr)
491
+
iferr:=os.Rename(dbPath, backupPath); err!=nil {
492
+
returnnil, errors.Wrapf(err, "failed to rename database file %s to %s", dbPath, backupPath)
493
+
}
494
+
495
+
// Attempt to open the database again. This should be a new database.
496
+
// If this fails, it is a permanent error.
497
+
returnopenDB(dbPath)
498
+
}
499
+
500
+
// openDB opens a bolt database in user-only read/write mode.
501
+
funcopenDB(dbPathstring) (*bolt.DB, error) {
502
+
returnbolt.Open(dbPath, 0600, nil)
503
+
}
504
+
505
+
// fileHasContent checks if we have access to the file with appropriate
0 commit comments