Fix #18191: Read tag timestamps once per request when reusable#20898
Fix #18191: Read tag timestamps once per request when reusable#20898WarLikeLaux wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2026-05-29T04:35:28.008ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesPer-request tag timestamp caching
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #20898 +/- ##
=========================================
Coverage 80.44% 80.45%
- Complexity 11540 11547 +7
=========================================
Files 374 374
Lines 30235 30250 +15
=========================================
+ Hits 24323 24338 +15
Misses 5912 5912 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What does this PR do?
TagDependencyignored the inheritedreusableflag: itsisChanged()override andgenerateDependencyData()both callgetTimestamps(), which queried the cache backend on every call. So even withreusable => true, reusing one dependency for many cache reads in a single request hit the backend each time.getTimestamps()now caches the fetched tag timestamps per request in a static property whenreusableis set, so each tag is read from the backend only once.touchKeys()refreshes that cache for keys it writes, so aninvalidate()in the same request is still detected.resetReusableData()clears it alongside the base data.With
reusable => false(the default) the method still queries the backend on every call, so existing behavior is unchanged.