Rebalancer is a domain-specific language and tool for specifying and solving assignment problems (eg, putting balls in boxes with complex rules).
by facebookC++
Last 12 weeks · 136 commits
5 of 6 standards met
Summary: Currently Standalone Explorer server needs the full path of bundle on disk for load. Let the standalone Explorer server load example bundles by bare name () instead of requiring the full mount path (), and switch all client-facing usages over to the bare form. The old format of full path remains supported. Differential Revision: D110356703
Summary: What is the change? Add a -based concurrency cap to that limits how many sandboxes can load simultaneously, controlled by a new gflag (default: 3). What problem does it solve? The service has been OOM-crashing (alert 1236338314944490, SEV S677672) when QUEUE_LAG dogpile events trigger many concurrent loads of IPNext expression graphs (~39-46 GB each). With the 240 GB container and no concurrency limit, 6+ simultaneous loads exhaust memory. Scuba analysis of (last 7 days, 12,558 loads across 14 services) shows: (IPNext) dominates: 12,417 loads, p50=38.9 GB, max=46.0 GB Peak hourly load rate: 32 large sandbox loads/hour At 46 GB per sandbox, 3 concurrent loads = 138 GB peak transient memory, well within the 240 GB container How is it implemented? constructor accepts (0 = disabled) acquires a token before , re-checks status after acquiring (dedup), releases in both success and error paths gflag (default 3) wired through factory in the service handler The existing 60-minute TTL eviction () is unchanged. Count-based LRU eviction (max_resident_sandboxes) is deferred to a follow-up diff that will use memory-based thresholds instead of sandbox count. See also: Bento notebook bento://N11229615 for the full Scuba analysis. How is it validated? Unit test with a that tracks peak concurrent loads via atomics and a configurable load delay. Author Sign-off [ ] I've read and understood all AI-generated code in this diff. [ ] I've verified AI-generated tests/benchmarks accurately validate the intent of changes. Differential Revision: D110093491
Summary: Adds an optional field to : a , for all the given scopeItem and group pair, presence-weight will always be honored even at zero utilization. This lets a caller declare exactly which pairs need presence honored, replacing the legacy frozen dummy-object pattern used in GSP IPNext. Differential Revision: D109896725
Summary Two independent CI failures on , both fixed in this PR. 1. macOS wheels: Root cause: cmake 3.31.x / scikit-build-core 0.12.x silently drops entries from MODULE and SHARED targets on macOS arm64. The built and have empty , so delocate-wheel 0.13.0 raises when it can't resolve and . Fix: New () that patches the missing rpaths before handing off to : 1. Adds to so delocate can walk the dep chain to 2. Adds each getdeps/brew prefix dir (from ) to so delocate can find and bundle transitive deps (, , , …) into 2. linux-sdk: Root cause: passed via , but getdeps silently excludes from its build-cache key. When a cached build exists (from a prior CI run), getdeps reuses the cached ninja graph which predates and omits . The SDK artifact is uploaded without the binary; the deb smoke test then fails with exit 127. Fix 1 (primary): Move into the manifest block — manifest defines ARE part of the cache key, so getdeps always builds . Fix 2 (belt-and-suspenders):** now detects absence of after the getdeps build and compiles it directly from the installed headers/library using clang, so the artifact is always complete even against a stale cache primed before this manifest change. Test plan [ ] workflow: macOS cp312/cp313/cp314 jobs pass (delocate no longer errors) [ ] workflow: step passes ( present and exits 0)
Summary: Remove and from all four services in . The GitHub runner's older Docker Compose rejected them with a schema validation error, failing the build before it started. Skip attestations instead via on the workflow's build step, preserving intent while keeping the file compose-version compatible. Additional changes: Update runner to 32-core-ubuntu Suppress INFO level logs Reviewed By: polmauri Differential Revision: D110209516
Summary Two independent CI failures on , both fixed in this PR. 1. macOS wheels: Root cause: cmake 3.31.x / scikit-build-core 0.12.x silently drops entries from MODULE and SHARED targets on macOS arm64. The built and have empty , so delocate-wheel 0.13.0 raises when it can't resolve and . Fix: New () that patches the missing rpaths before handing off to : 1. Adds to so delocate can walk the dep chain to 2. Adds each getdeps/brew prefix dir (from ) to so delocate can find and bundle transitive deps (, , , …) into 2. linux-sdk: Root cause: passed via , but getdeps silently excludes from its build-cache key. When a cached build exists (from a prior CI run), getdeps reuses the cached ninja graph which predates and omits . The SDK artifact is uploaded without the binary; the deb smoke test then fails with exit 127. Fix 1 (primary): Move into the manifest block — manifest defines ARE part of the cache key, so getdeps always builds . Fix 2 (belt-and-suspenders):** now detects absence of after the getdeps build and compiles it directly from the installed headers/library using clang, so the artifact is always complete even against a stale cache primed before this manifest change. Test plan [ ] workflow: macOS cp312/cp313/cp314 jobs pass (delocate no longer errors) [ ] workflow: step passes ( present and exits 0)
Repository: facebook/rebalancer. Description: Rebalancer is a domain-specific language and tool for specifying and solving assignment problems (eg, putting balls in boxes with complex rules). Stars: 8, Forks: 2. Primary language: C++. Languages: C++ (84.3%), Python (12%), Thrift (1.6%), CMake (1.5%), Shell (0.4%). License: Apache-2.0. Homepage: https://facebook.github.io/rebalancer/ Latest release: v1.0.2 (2w ago). Open PRs: 6, open issues: 0. Last activity: 8h ago. Community health: 87%. Top contributors: vj-menon, r-barnes, polmauri, kvelakur, yangneu2015, xiatingouyang, facebook-github-bot, giorgidze, zhztheplayer, naclander and others.