Repository navigation
docs: size and pre-build the 1.0 MongoDB indexes, and list the SAML and sign-in changes [ENG-1850] - #67
Merged
Conversation
|
| Topic | Details | ||||||
|---|---|---|---|---|---|---|---|
| MongoDB Upgrade Flow | Document how to estimate MongoDB index-build duration, pre-build indexes before upgrading, sequence scheduler migrations, monitor readiness, and plan maintenance or rollback windows.Modified files (2)
Latest Contributors(1)
| ||||||
| SSO and Sign-In | Explain required signed SAML assertions and direct operators to 1.0.1 for restored legacy-account sign-in and automatic removal of account_issuer_accountId_uidx.Modified files (2)
Latest Contributors(1)
|
…nd sign-in changes [ENG-1850] The 1.0 upgrade guide said the scheduler's startup took under a minute with 100,000 runs and was not downtime. It did not mention the index builds, which on a large database take hours: on `instances` the scheduler drops the two indexes 0.8.x reads a run's spec files with before it builds their replacements, and every build loads the secondaries the API reads from. The guide now: - gives a mongosh snippet that estimates the index builds and migrations from the install's own collection sizes and run count, with the rates behind it; - lists the `createIndexes` commands that build the new indexes on `instances`, `runs`, `testRecord` and `instanceStats` before the upgrade, so run reads keep an index throughout and the upgrade only drops the old two; - warns that the 0.8.x scheduler drops the pre-built `instances` indexes if it restarts before the upgrade, and that a rollback rebuilds them; - says the builds come before the migrations, and replaces "This is not downtime"; - adds that 1.0 requires the SAML assertion to be signed, and that 1.0.0 refused existing users while 1.0.1 signs them in and drops `account_issuer_accountId_uidx` itself. The rates come from an upgrade rehearsal with 100,000 runs, 500,000 instances and 600,000 test records (about 1 second per GB read), and from the production database (about 0.6 minutes per GB). The commands were run verbatim on the rehearsal database: the scheduler then built nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
twk3
force-pushed
the
docs/eng-1850-upgrade-1-0-index-prebuild
branch
from
October 22, 2026 06:06
a259f7f to
c13dfcb
Compare
twk3
marked this pull request as ready for review
October 23, 2026 22:44
The guide pre-builds an index on `instanceStats`, which grows with history, but the estimate summed only `instances`, `runs` and `testRecord`, so the window it gave left that build out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Owner: @twk3
Linear: ENG-1850
The 1.0 upgrade guide told operators the scheduler's startup took "under a minute with 100,000 runs" and was "not downtime". It said nothing about the MongoDB index builds, which on a large database take hours and load the secondaries the API reads from (ENG-1849). This rewrites the guide around those builds, and adds the SAML and sign-in changes the upgrade needs.
Merge after the 1.0.1 release. The guide tells readers to upgrade to
1.0.1(images2026-10-14-002, #66), and itshelm upgradecommand uses--version 1.0.1.Changes to
docs/eks/upgrade-1.0.mdinstancesit dropsrunId_1_createdAt_1__id_1andinstanceId_1_projectId_1_orgId_1__id_-1before buildingrunId_1_createdAt_1__id_-1andcreatedAt_1, and every build loads the secondaries the API reads from.2 × instances + runs + testRecord, fromstats().size), an index-build range, and minutes of migrations per 100,000 runs, with where each rate comes from.createIndexescommands for every new index oninstances,runs(four),testRecord(two) andinstanceStats, run with0.8.xstill serving. Thenhelm upgradestraight after.0.8.xscheduler drops the pre-builtinstancesindexes and rebuilds its own. The guide says to checkgetIndexes()before upgrading.20261009and20261021.Assertion(SAML_ASSERTION_SIGNATURE_REQUIRED,wantAssertionsSigned: truein code). In Okta, set Assertion Signature to Signed.1.0.0locked out existing users, and1.0.1signs them in.account_issuer_accountId_uidx, so thedropIndexthe issue mentions isn't needed by hand.issueradded by hand is harmless.0.8.x's scheduler rebuilds theinstancesindexes, with the same unindexed window.CHANGELOG.md: the1.0.0upgrade notes get the same corrections.How the numbers were measured
An upgrade rehearsal on Docker Compose:
2026-07-26-006upgraded to the2026-10-14-002scheduler, with Mongo 8.2.3 on a laptop.Dataset, cloned from real dev documents and shaped as
006writes them:stats().sizerunsinstancestestRecordIndex builds (from
mongod's log):instancesrunId_1_createdAt_1__id_-1instancescreatedAt_1runs, all fourtestRecord, bothThat is about 1 s per GB read, the low end. Limiting
mongodto a 0.25 GB cache and 1.5 GB of memory changed nothing, because the laptop's disk reads the compressed data in seconds. The high end, about 0.6 minutes per GB, comes from a large production database building the same indexes under load, and the rate matches that database's total build time.Migrations:
20260918took 28–29 s per 100,000 runs (ENG-1741: 25–27 s).070took 22 s (ENG-1741: 9–12 s, with smaller runs).The pre-build, as published: I extracted the estimate snippet and the commands from this guide's markdown and ran them on a fresh
006-state database. All the builds finished in 11 s, and the upgrade's index sync then only dropped the two oldinstancesindexes.Every new index the upgrade builds:
usage_totals_by_org_day,timeoutAfter_1, two onapiKeys, two onnotifications, andauth_user_cognito_user_id_unique.The
testRecordindexes weren't in the issue. That collection only shrinks when runs are deleted, and on a dev install it was larger thaninstances.Not covered here
Once those land, the warning about the old scheduler restarting and the hand-run commands can go.
🤖 Generated with Claude Code