mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 09:14:39 +03:00
add debug logging about bstore db schema upgrades
bstore was updated to v0.0.6 to add this logging. this simplifies some of the db-handling code in mtastsdb,tlsrptdb,dmarcdb. we now call the package-level Init() and Close() in all tests properly.
This commit is contained in:
@ -313,7 +313,8 @@ func backupctl(ctx context.Context, ctl *ctl) {
|
||||
}
|
||||
|
||||
dstdbpath := filepath.Join(dstDataDir, path)
|
||||
db, err := bstore.Open(ctx, dstdbpath, &bstore.Options{MustExist: true}, queue.DBTypes...)
|
||||
opts := bstore.Options{MustExist: true, RegisterLogger: ctl.log.Logger}
|
||||
db, err := bstore.Open(ctx, dstdbpath, &opts, queue.DBTypes...)
|
||||
if err != nil {
|
||||
xerrx("open copied queue database", err, slog.String("dstpath", dstdbpath), slog.Duration("duration", time.Since(tmQueue)))
|
||||
return
|
||||
@ -419,7 +420,8 @@ func backupctl(ctx context.Context, ctl *ctl) {
|
||||
}
|
||||
|
||||
dstdbpath := filepath.Join(dstDataDir, dbpath)
|
||||
db, err := bstore.Open(ctx, dstdbpath, &bstore.Options{MustExist: true}, store.DBTypes...)
|
||||
opts := bstore.Options{MustExist: true, RegisterLogger: ctl.log.Logger}
|
||||
db, err := bstore.Open(ctx, dstdbpath, &opts, store.DBTypes...)
|
||||
if err != nil {
|
||||
xerrx("open copied account database", err, slog.String("dstpath", dstdbpath), slog.Duration("duration", time.Since(tmAccount)))
|
||||
return
|
||||
|
Reference in New Issue
Block a user