Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Don't update prev delta url (#4521)
Browse files Browse the repository at this point in the history
<!-- PR description-->

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](5215e90#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?

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

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ] ⚡ Unit test
- [ ] 💚 E2E
  • Loading branch information
pandeyabs authored Oct 17, 2023
1 parent 08e8b18 commit f3dfa1e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/internal/m365/collection/drive/url_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (uc *urlCache) refreshCache(
}
}

du, err := pager.Results()
_, err := pager.Results()
if err != nil {
return clues.Stack(err)
}
Expand All @@ -185,7 +185,6 @@ func (uc *urlCache) refreshCache(

// Update last refresh time
uc.lastRefreshTime = time.Now()
uc.prevDelta = du.URL

return nil
}
Expand Down

0 comments on commit f3dfa1e

Please sign in to comment.