feat: advisory warnings for realtime provisioning estimates (#8339) - #19026
feat: advisory warnings for realtime provisioning estimates (#8339)#19026Vamsi-klu wants to merge 1 commit into
Conversation
|
Ready for review. Adds advisory sanity-check warnings for realtime provisioning estimates and stops hiding over-host-memory cells as NA (#8339). Please take a look when you have a chance: Notes for review:
Happy to adjust thresholds, copy, or JSON shape based on feedback. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19026 +/- ##
============================================
+ Coverage 57.10% 65.37% +8.26%
- Complexity 7 1405 +1398
============================================
Files 2629 3424 +795
Lines 156315 216086 +59771
Branches 25533 34220 +8687
============================================
+ Hits 89271 141256 +51985
- Misses 59423 63440 +4017
- Partials 7621 11390 +3769
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@Vamsi-klu Can you take a look at the test failures, and rebase to the latest master? cc @swaminathanmanish @krishan1390 @KKcorps @noob-se7en to take a look |
Summary
Adds advisory sanity-check warnings to realtime provisioning estimates (CLI + recommender JSON) and stops hiding over-host-memory matrix cells behind opaque
NA.Issue: Fixes #8339
What is the problem?
The Realtime Provisioning Helper / recommender rule can recommend multi‑GB segments or host/hour combinations whose active memory exceeds
-maxUsableHostMemorywithout calling that out. Previously, over-memory cells were shown asNA, the same token used whennumHoursToConsume > retentionHours, which:Issue discussion converged on warnings over hard limits (large segments can be valid for huge volumes after conscious tradeoff).
Why did I do this?
Provisioning mistakes become production OOM, long consumption pauses, and upload timeouts. Advisory warnings preserve recommendation math while making danger visible. Thresholds are named constants for easy review (500 MiB segment size; 5_000 segments/host).
What is the implementation edit?
RealtimeProvisioningWarnings.javaRealtimeProvisioningWarningsTest.javaMemoryEstimator.javagetMaxUsableHostMemory()RealtimeProvisioningHelperCommand.javaRealtimeProvisioningRule.java"Warnings"entry to recommender output as numbered nested map ("1"→ msg, …) fitting existingMap<String,Map<String,String>>payloadTestConfigEngine.javaWarningsWarning categories:
NAexplanation (hours > retention only)API note: #8339 asked for an array of warnings; implementation uses a numbered map under the existing matrix bag for backward-compatible JSON shape. Consumers that iterate recommendation keys as matrices should skip
"Warnings".Behavior change: Over-memory cells are no longer
NA. Scripts that treated non-NAas “fits in host memory” must readWarnings(or compare to max usable memory) going forward.What is the impact?
NA.NA⇒ safe; documented in this PR.operate-pinot/tuning/realtime.What is the testing edit?
Coverage includes: modest grids (no warn), large segment + cell label, memory over host + cell label, high segment count, NA explanation, multiple warnings display format, malformed cell skip, recommender high-ingestion
Warningsmap.Not run: full monorepo precommit, multi-node E2E (tooling-only path).
Checklist