Update log statements for base finder (#4588)

Store more info in the context so that log statements need to add fewer additional fields.

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup


#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-10-31 17:23:13 -07:00 committed by GitHub
parent 29d4e5a328
commit cd75ec7e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,19 +183,20 @@ func (b *baseFinder) findBasesInSet(
continue
}
ictx = clues.Add(ictx, "search_backup_id", bup.ID)
ssid := bup.StreamStoreID
if len(ssid) == 0 {
ssid = bup.DetailsID
}
if len(ssid) == 0 {
logger.Ctx(ictx).Debugw(
"empty backup stream store ID",
"search_backup_id", bup.ID)
logger.Ctx(ictx).Debug("empty backup stream store ID")
continue
}
ictx = clues.Add(ictx, "ssid", ssid)
// If we've made it to this point then we're considering the backup
// complete as it has both an item data snapshot and a backup details
// snapshot.
@ -215,21 +216,14 @@ func (b *baseFinder) findBasesInSet(
Reasons: []identity.Reasoner{reason},
}
logger.Ctx(ictx).Infow(
"found assist base",
"search_backup_id", bup.ID,
"search_snapshot_id", meta.ID,
"ssid", ssid)
logger.Ctx(ictx).Info("found assist base")
}
// Skip if an assist base has already been selected.
continue
}
logger.Ctx(ictx).Infow("found merge base",
"search_backup_id", bup.ID,
"search_snapshot_id", meta.ID,
"ssid", ssid)
logger.Ctx(ictx).Info("found merge base")
mergeBase = &BackupBase{
Backup: bup,