Maximum namespace value I'm finding in production is around 3000. Smallint works up to 32K and Mediumint up to 8.3M. While, the saved space would be negligible in page table. I care more about tl_from_namespace field and similar in links tables. It can save up to tens of gigabytes from each commons database without issues. According to https://www.mediawiki.org/wiki/Extension_default_namespaces, the only extension using above 32K value for namespace is https://www.mediawiki.org/wiki/Extension:WSSpaces It might be quite hard to change that to values below 32K so mediumint would be the good first step?
Description
Related Objects
- Mentioned In
- T383803: [sqoop] Check if a sqoop needs changes when one mariadb field changes from int to smallint
- Mentioned Here
- T398709: FY2025-26 WE 6.4.1: Move links tables of commons to a dedicated cluster
T383803: [sqoop] Check if a sqoop needs changes when one mariadb field changes from int to smallint
T180885: Create maintenance script to renumber namespaces
Event Timeline
I tried to use mediumint but doctrine gives:
Unknown column type "mediumint" requested.
I see it here: https://github.com/doctrine/dbal/blob/4933e8482b81f111c30a7e1ca0fea24fb2aa25a5/src/Platforms/AbstractMySQLPlatform.php#L747 but I guess since it's not fully supported, probably not allowed.
I think we can go to smallint. We should just talk to WSSpaces and make sure they can change the namespace entries beforehand.
I guess we should update the sqoop jobs accordingly.
But maybe they will continue to work without changes if they accept the smallint as a valid entry already?
Should we check?
I think you are right, but someone needs to check. Hive has int and bigint (long) but I don't think it has smaller types. We should just be sure that e.g. mediumint will automatically map and ingest to the int fields in Hive.
I am not sure we still want it when we will do T398709: FY2025-26 WE 6.4.1: Move links tables of commons to a dedicated cluster.