Repository navigation
Conversation
Contributor
|
I don't think anyone needs to bother with that now except LHCb, so running the update is not mandatory, but it is good to change the code. |
Contributor
|
StoredProcedure should also be updated to respect the type of what's in table (e.g. FYI, this was not done in LHCb but we are safe because it is in fact dead code, and also the stored procedure were recorded a long time ago, before the strict mode, so we actually just ignore the output |
fstagni
force-pushed
the
91_bigintRepID
branch
from
October 27, 2026 16:11
31f8905 to
755985d
Compare
FC_Replicas.RepID was a signed INT, which can be exhausted on large catalogs because AUTO_INCREMENT values are never reused (also on failed or duplicate inserts). Widen RepID to BIGINT in FileCatalogDB and FileCatalogWithFkAndPsDB, and keep FC_ReplicaInfo.RepID consistent.
fstagni
force-pushed
the
91_bigintRepID
branch
from
November 11, 2026 17:04
755985d to
c660d83
Compare
fstagni
marked this pull request as draft
November 12, 2026 10:02
Contributor
|
For the record, more fields need doing, so I am testing it now and will update the procedure once done |
This branch has not been deployed
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.
BEGINRELEASENOTES
*DMS
CHANGE: FileCatalogDB - FC_Replicas.RepID and FC_ReplicaInfo.RepID widened to BIGINT to avoid AUTO_INCREMENT exhaustion
*deployment
ENDRELEASENOTES
Summary
FC_Replicas.RepIDwas a signedINT(max 2147483647). InnoDBAUTO_INCREMENTvalues are never reused - not afterDELETE, rollback, or failed/duplicate inserts - and the DFC churns them heavily (re-registrations attempting inserts that fail on theUNIQUE (FileID,SEID)key, replica migrations), so the counter runs ahead of the live row count until inserts start failing on large catalogs.The same change is applied to the reference schema in
FileCatalogWithFkAndPsDB.sql.Evidence
Exercised on a production instance (dbod-dfc, FileCatalogDB):
ALGORITHM=COPYis mandatory: data-type changes are not eligible forINPLACE/INSTANT, so this rebuilds the table and blocks concurrent DML for its duration. On very largeFC_Replicastables,pt-online-schema-change/gh-ostcan be used instead.FC_ReplicaInfo.RepIDstores the same IDs and must be widened too, otherwise it will start failing once RepID crosses 2^31.Merge Danger
Door: two-way
Reverting the code change is trivial. Widening
INTtoBIGINTon live databases is not reversible without another table rebuild, but it is strictly safe: no values are lost, and existingINT-typed consumers ofRepIDreceive a wider type transparently.Blast Radius: FileCatalogDB schema