fix(router): stop pinning schema AST in cached plan entries#3007
fix(router): stop pinning schema AST in cached plan entries#3007arutkowski00 wants to merge 2 commits into
Conversation
planWithMetaData stored schemaDocument (full router schema AST, ~200MB) in every cached plan entry but never read it. Drop the field so plan caches do not retain the old schema generation after config reload.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough
ChangesOperation planner metadata cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" 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 @@
## main #3007 +/- ##
==========================================
- Coverage 60.27% 54.33% -5.95%
==========================================
Files 477 243 -234
Lines 62471 29464 -33007
Branches 6131 0 -6131
==========================================
- Hits 37656 16010 -21646
+ Misses 24787 11883 -12904
- Partials 28 1571 +1543
🚀 New features to boost your workflow:
|
dkorittki
left a comment
There was a problem hiding this comment.
Hey @arutkowski00, thanks for the contribution. This is safe to merge. Only needs a gofmt on router/core/operation_planner.go. Would do it myself but can't push to your branch. Can you do it?
|
Closing this PR because this is now handled in #3023 |
Problem
planWithMetaDatastoredschemaDocument(full router schema AST, ~200MB) in every Ristretto plan cache entry but never read it. After config reload, cached plans pinned the previous schema generation.Fix
Remove the unused
schemaDocumentfield.Test plan
go test ./router/core/...Part of config hot-reload memory leak investigation (monday.com #3221).
Summary by CodeRabbit