From f3dfa1e46b8cba74c07d1519315fe68398d8b84f Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Tue, 17 Oct 2023 12:28:36 -0700 Subject: [PATCH] Don't update prev delta url (#4521) URL cache should use the same delta token base used by `ProduceCollections`. This is because we want to update URLs for the set of items which was discovered by `ProduceCollections`. Otherwise, we'll have url cache misses & we'll have to resort to doing GetItem graph calls for each item which means we lose all goodness of the url cacche. This reverts a change introduced in a recent [PR](https://github.com/alcionai/corso/commit/5215e907b05c25415e738c21a1292d33f74e3419#diff-f79ab9c9b31db3600d4e14b6df4d4c679b4356e32c3a68eaeaeb934c1c5a13a7R175) where we are updating cache's delta token base to a newer one. --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issue(s) * # #### Test Plan - [ ] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/internal/m365/collection/drive/url_cache.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/internal/m365/collection/drive/url_cache.go b/src/internal/m365/collection/drive/url_cache.go index 654979626..81c21213e 100644 --- a/src/internal/m365/collection/drive/url_cache.go +++ b/src/internal/m365/collection/drive/url_cache.go @@ -176,7 +176,7 @@ func (uc *urlCache) refreshCache( } } - du, err := pager.Results() + _, err := pager.Results() if err != nil { return clues.Stack(err) } @@ -185,7 +185,6 @@ func (uc *urlCache) refreshCache( // Update last refresh time uc.lastRefreshTime = time.Now() - uc.prevDelta = du.URL return nil }