Repository navigation
perf(scheduler): omit expanded groups from account cache - #8845
Merged
Wei-Shaw merged 1 commit intoNov 20, 2026
Merged
Conversation
r266-tech
force-pushed
the
codex/scheduler-compact-account-groups
branch
from
November 17, 2026 09:12
0d1380d to
18c42a2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #8842.
When an account belongs to many groups,
sched:acc:<id>serializes each expanded group both inGroupsand inAccountGroups[].Group. Neither graph is used by scheduler hydration: group admission uses the membership IDs, while admin/ops group displays read the account repository.Before marshaling the value copy, omit
Groupsand reuse the existing membership projection forAccountGroups. This retains account/group IDs, priorities and creation times while dropping the nested Account/Group pointers. Credentials, extra settings, proxy configuration and account scheduling/billing fields remain in the full record. BothSetAccountand snapshot rebuilds use this serializer; the repository's original object stays intact.Synthetic account round trips through both write paths produce:
These fixtures include expanded group descriptions and account edges; the numbers describe the fixtures, not the reporter's production data. The new regression fails on the original main baseline
530c5e3afor all eight write-path/size combinations and passes with this change. It checks the complete hydrated account, all memberships and the untouched source object. A legacy-payload control remains readable, and the Redis integration fixture checks compact memberships alongside full credentials.Local validation of
18c42a29d, rebased onto main15871f904, on Go 1.27.4 / macOS arm64:go test -p 1 -tags=unit ./... -count=1): 28,229 test/subtest entries passed, 41 skipped.go test -p 1 -tags=integration ./... -count=1, real Docker fixtures): 16,733 passed, 16 skipped.govulncheck ./...: exit 0, no reachable vulnerabilities and no affected imported packages reported; six module-level advisories remain outside the imported package/call results.The rebase incorporates the already merged Go 1.27.4 upgrade from #8767, including the CI and Docker toolchain pins. The previous Go 1.27.3
GO-2026-6859failure no longer appears in the local scan.git range-diffconfirms this PR's patch is unchanged. Both full test suites above use the branch as written, with no test or product-code overlays. Hosted CI for the new head is still pending.This addresses payload size within #8842. Repeated identical SETs, cross-bucket/instance coordination and the reported Sentinel replication behavior remain for separate investigation. #8833 handles read-side loading and fallback coalescing; this serializer change is independent of it. No live provider requests or production changes were made.
AI-assisted implementation and local verification.