Repository navigation
refactor(server): honor cgroup reclaim protection - #3325
Conversation
- exclude cache protected by child memory.min - reject finite limits with unknown memory usage - preserve ordinary warm-cache and v1 behavior - cover permission failures and document conservative sizing
- derive the v1 sentinel from native word and page sizes - continue checking finite ancestors of unlimited cgroups - retain host sizing when no finite cgroup limit exists - verify unknown-usage and sentinel boundaries
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3325 +/- ##
============================================
- Coverage 52.63% 52.58% -0.05%
+ Complexity 2435 2370 -65
============================================
Files 770 762 -8
Lines 67694 67674 -20
Branches 9172 9189 +17
============================================
- Hits 35631 35587 -44
- Misses 28520 28536 +16
- Partials 3543 3551 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
imbajin
left a comment
There was a problem hiding this comment.
Cross-checked against fork #299: this PR has the same head, base and three-file patch reviewed independently by two reviewers. Source-review score: 8.5/10; no new blocking defect found. Unknown usage under a finite limit fails conservatively; v1 unlimited levels are skipped before reading usage; v2 child protection can remove cache credit. The extra enumeration is confined to startup, not query hot paths. Remaining validation: non-root permission cases and real cgroup warm/cold pressure/OOM behavior. Dropping all cache credit for protected/unknown children is intentionally conservative and may reject otherwise viable warm starts. Fork CI is separate from this upstream PR’s current checks; this is not full 1.8.0 acceptance.
imbajin
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: One non-blocking cgroup v1 edge case remains in the userspace word-size assumption. Evidence: util.sh uses getconf LONG_BIT; latest-head checks show no blocking failures, while codecov/project is non-blocking.
- infer v1 unlimited limits from known kernel machines - preserve finite limits on unknown or masked machines - cover compatibility metadata and missing usage
- describe kernel architecture and page-size recognition - preserve finite limits for unknown architectures - keep runtime and deployment verification boundaries
Parent cgroup cache could be counted as reclaimable even when sibling memory.min protects it. Exclude that credit when protection is active or cannot be established. Finite limits with unknown usage provide no heap budget; recognized v1 unlimited sentinels retain the existing host fallback.
Validated with shell regressions, bounded Linux kernel reclaim controls and the Java 17 reactor build. Three independent final reviews passed. The same source branch passed the selected checks in org #299, including the Store retry and required reporter.
The repository runtime guide is updated; website deployment guidance is paired with Docs #517. Full Server, warm-cache pressure and container/OOM acceptance remain tracked in the 1.8.0 validation documents.
Implementation overview
Conceptual startup memory-budget flow; not runtime/OOM evidence.
V1 unlimited limits use recognized kernel machine names; unknown or masked names retain the finite-limit path, including 32-bit userspace on a 64-bit kernel.