do not wait on deleted collections (#1953)

## Type of change

- [x] 🐛 Bugfix

## Issue(s)

* #1950

## Test Plan

- [x] 💪 Manual
This commit is contained in:
Keepers 2022-12-23 17:10:49 -07:00 committed by GitHub
parent 442686e51e
commit eacb638099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,9 +56,17 @@ func (gc *GraphConnector) DataCollections(
return nil, err
}
for range colls {
for _, c := range colls {
// kopia doesn't stream Items() from deleted collections,
// and so they never end up calling the UpdateStatus closer.
// This is a brittle workaround, since changes in consumer
// behavior (such as calling Items()) could inadvertently
// break the process state, putting us into deadlock or
// panics.
if c.State() != data.DeletedState {
gc.incrementAwaitingMessages()
}
}
return colls, nil