Add logs
This commit is contained in:
parent
7b88c9ae8d
commit
3be2609bbc
@ -373,23 +373,36 @@ func (op *BackupOperation) do(
|
|||||||
// the entire subtree instead of returning an additional bool. That way base
|
// the entire subtree instead of returning an additional bool. That way base
|
||||||
// selection is controlled completely by flags and merging is controlled
|
// selection is controlled completely by flags and merging is controlled
|
||||||
// completely by collections.
|
// completely by collections.
|
||||||
cs, ssmb, canUsePreviousBackup, err := produceBackupDataCollections(
|
|
||||||
ctx,
|
|
||||||
op.bp,
|
|
||||||
op.ResourceOwner,
|
|
||||||
op.Selectors,
|
|
||||||
mdColls,
|
|
||||||
lastBackupVersion,
|
|
||||||
op.Options,
|
|
||||||
op.Errors)
|
|
||||||
if err != nil {
|
|
||||||
return nil, clues.Wrap(err, "producing backup data collections")
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx = clues.Add(
|
var cs []data.BackupCollection
|
||||||
ctx,
|
maxAttempts := 30
|
||||||
"can_use_previous_backup", canUsePreviousBackup,
|
|
||||||
"collection_count", len(cs))
|
for i := 0; i < maxAttempts; i++ {
|
||||||
|
logger.Ctx(ctx).Info("delta query begin")
|
||||||
|
cs, _, _, err := produceBackupDataCollections(
|
||||||
|
ctx,
|
||||||
|
op.bp,
|
||||||
|
op.ResourceOwner,
|
||||||
|
op.Selectors,
|
||||||
|
mdColls,
|
||||||
|
lastBackupVersion,
|
||||||
|
op.Options,
|
||||||
|
op.Errors)
|
||||||
|
if err != nil {
|
||||||
|
logger.CtxErr(ctx, err).Error("producing backup data collections")
|
||||||
|
|
||||||
|
if i == maxAttempts-1 {
|
||||||
|
return nil, clues.Wrap(err, "producing backup data collections")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.Ctx(ctx).Info("delta query end")
|
||||||
|
|
||||||
|
ctx = clues.Add(
|
||||||
|
ctx,
|
||||||
|
"can_use_previous_backup", false,
|
||||||
|
"collection_count", len(cs))
|
||||||
|
}
|
||||||
|
|
||||||
writeStats, deets, toMerge, err := consumeBackupCollections(
|
writeStats, deets, toMerge, err := consumeBackupCollections(
|
||||||
ctx,
|
ctx,
|
||||||
@ -398,9 +411,9 @@ func (op *BackupOperation) do(
|
|||||||
reasons,
|
reasons,
|
||||||
mans,
|
mans,
|
||||||
cs,
|
cs,
|
||||||
ssmb,
|
nil,
|
||||||
backupID,
|
backupID,
|
||||||
op.incremental && canUseMetadata && canUsePreviousBackup,
|
op.incremental && canUseMetadata && false,
|
||||||
op.Errors)
|
op.Errors)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, clues.Wrap(err, "persisting collection backups")
|
return nil, clues.Wrap(err, "persisting collection backups")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user