Add periodic log message for loading items during restore (#3282)
#### 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 - [x] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Issue(s) * #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
c152ce8b25
commit
5f43287feb
@ -413,6 +413,7 @@ func (w Wrapper) ProduceRestoreCollections(
|
||||
}
|
||||
|
||||
var (
|
||||
loadCount int
|
||||
// Maps short ID of parent path to data collection for that folder.
|
||||
cols = map[string]*kopiaDataCollection{}
|
||||
el = errs.Local()
|
||||
@ -451,6 +452,11 @@ func (w Wrapper) ProduceRestoreCollections(
|
||||
}
|
||||
|
||||
c.streams = append(c.streams, ds)
|
||||
|
||||
loadCount++
|
||||
if loadCount%1000 == 0 {
|
||||
logger.Ctx(ctx).Infow("loading items from kopia", "loaded_count", loadCount)
|
||||
}
|
||||
}
|
||||
|
||||
// Can't use the maps package to extract the values because we need to convert
|
||||
@ -460,6 +466,8 @@ func (w Wrapper) ProduceRestoreCollections(
|
||||
res = append(res, c)
|
||||
}
|
||||
|
||||
logger.Ctx(ctx).Infow("done loading items from kopia", "loaded_count", loadCount)
|
||||
|
||||
return res, el.Failure()
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user