fix cherry pick conflicts
This commit is contained in:
parent
77c6495bda
commit
8299bb30c4
@ -664,10 +664,6 @@ func (op *BackupOperation) createBackupModels(
|
|||||||
deets *details.Details,
|
deets *details.Details,
|
||||||
) error {
|
) error {
|
||||||
ctx = clues.Add(ctx, "snapshot_id", snapID, "backup_id", backupID)
|
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 {
|
if deets == nil {
|
||||||
return clues.New("no backup details to record").WithClues(ctx)
|
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))
|
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 {
|
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()))
|
ctx = clues.Add(ctx, "details_snapshot_id", detailsID)
|
||||||
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)
|
|
||||||
|
|
||||||
b := backup.New(
|
b := backup.New(
|
||||||
snapID, detailsID, op.Status.String(),
|
snapID, detailsID, op.Status.String(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user