From 8299bb30c48c6d10fa400bb2e3871d34922f1c61 Mon Sep 17 00:00:00 2001 From: ryanfkeepers Date: Wed, 22 Mar 2023 15:18:49 -0600 Subject: [PATCH] fix cherry pick conflicts --- src/internal/operations/backup.go | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/internal/operations/backup.go b/src/internal/operations/backup.go index 6ab209cde..06c83ea26 100644 --- a/src/internal/operations/backup.go +++ b/src/internal/operations/backup.go @@ -664,10 +664,6 @@ func (op *BackupOperation) createBackupModels( deets *details.Details, ) error { ctx = clues.Add(ctx, "snapshot_id", snapID, "backup_id", backupID) - // generate a new fault bus so that we can maintain clean - // separation between the errors we serialize and those that - // are generated during the serialization process. - errs := fault.New(true) if deets == nil { return clues.New("no backup details to record").WithClues(ctx) @@ -675,22 +671,12 @@ func (op *BackupOperation) createBackupModels( ctx = clues.Add(ctx, "details_entry_count", len(deets.Entries)) - err := sscw.Collect(ctx, streamstore.DetailsCollector(deets)) + detailsID, err := detailsStore.Write(ctx, deets, op.Errors) if err != nil { - return clues.Wrap(err, "collecting details for persistence").WithClues(ctx) + return clues.Wrap(err, "creating backupDetails model").WithClues(ctx) } - err = sscw.Collect(ctx, streamstore.FaultErrorsCollector(op.Errors.Errors())) - if err != nil { - return clues.Wrap(err, "collecting errors for persistence").WithClues(ctx) - } - - ssid, err := sscw.Write(ctx, errs) - if err != nil { - return clues.Wrap(err, "persisting details and errors").WithClues(ctx) - } - - ctx = clues.Add(ctx, "streamstore_snapshot_id", ssid) + ctx = clues.Add(ctx, "details_snapshot_id", detailsID) b := backup.New( snapID, detailsID, op.Status.String(),