From 2acf01af31291c60c31e924821214fd132e1eebf Mon Sep 17 00:00:00 2001 From: ryanfkeepers Date: Wed, 21 Dec 2022 16:41:22 -0700 Subject: [PATCH] minor fixes from code review --- src/internal/connector/exchange/service_iterators.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/internal/connector/exchange/service_iterators.go b/src/internal/connector/exchange/service_iterators.go index 93c08d871..9ac8ef5dc 100644 --- a/src/internal/connector/exchange/service_iterators.go +++ b/src/internal/connector/exchange/service_iterators.go @@ -49,7 +49,7 @@ func filterContainersAndFillCollections( deltaURLs = map[string]string{} currPaths = map[string]string{} // copy of previousPaths. any folder found in the resolver get - // deleted from this map, leaving only the deleted maps behind + // deleted from this map, leaving only the deleted folders behind tombstones = makeTombstones(dps) ) @@ -100,10 +100,12 @@ func filterContainersAndFillCollections( jobs, newDelta, err := getJobs(ctx, service, qp.ResourceOwner, cID, prevDelta) if err != nil { // race conditions happen, containers might get deleted while - // this process is in flight. If it was deleted, we skip it - // and move on, which will create a tombstone to delete the path. + // this process is in flight. If it was deleted, we remake the + // tombstone, just to be sure it gets deleted from storage. if graph.IsErrDeletedInFlight(err) == nil { errs = support.WrapAndAppend(qp.ResourceOwner, err, errs) + } else { + tombstones[currPath.String()] = struct{}{} } continue