Page MenuHomePhabricator

Fix CreditsSource drifts
Closed, ResolvedPublic

Description

One of the biggest drifts reports is this extension, in wide variety of drifts too: P42745

The good thing is that these tables are only in wikivoyage wikis and they are quite small so fixes can happen by running alter table on master with replication.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Mentioned in SAL (#wikimedia-operations) [2023-01-05T12:46:52Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1096:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42852 and previous config saved to /var/cache/conftool/dbconfig/20230105-124651-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T13:32:13Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1096:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42855 and previous config saved to /var/cache/conftool/dbconfig/20230105-133211-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T13:32:34Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1100 (T326156)', diff saved to https://phabricator.wikimedia.org/P42856 and previous config saved to /var/cache/conftool/dbconfig/20230105-133234-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T13:34:49Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1100 (T326156)', diff saved to https://phabricator.wikimedia.org/P42857 and previous config saved to /var/cache/conftool/dbconfig/20230105-133448-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T14:20:08Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1100 (T326156)', diff saved to https://phabricator.wikimedia.org/P42860 and previous config saved to /var/cache/conftool/dbconfig/20230105-142008-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T14:20:30Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1110 (T326156)', diff saved to https://phabricator.wikimedia.org/P42861 and previous config saved to /var/cache/conftool/dbconfig/20230105-142029-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T14:22:45Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1110 (T326156)', diff saved to https://phabricator.wikimedia.org/P42862 and previous config saved to /var/cache/conftool/dbconfig/20230105-142244-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T15:08:04Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1110 (T326156)', diff saved to https://phabricator.wikimedia.org/P42866 and previous config saved to /var/cache/conftool/dbconfig/20230105-150804-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T15:08:25Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1113:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42867 and previous config saved to /var/cache/conftool/dbconfig/20230105-150825-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T15:09:40Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1113:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42868 and previous config saved to /var/cache/conftool/dbconfig/20230105-150939-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T15:55:03Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1113:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42871 and previous config saved to /var/cache/conftool/dbconfig/20230105-155503-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T15:55:24Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1144:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42872 and previous config saved to /var/cache/conftool/dbconfig/20230105-155524-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T15:57:39Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1144:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42873 and previous config saved to /var/cache/conftool/dbconfig/20230105-155738-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T16:42:58Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1144:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42876 and previous config saved to /var/cache/conftool/dbconfig/20230105-164258-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T16:43:58Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1161 (T326156)', diff saved to https://phabricator.wikimedia.org/P42877 and previous config saved to /var/cache/conftool/dbconfig/20230105-164358-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T16:46:13Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1161 (T326156)', diff saved to https://phabricator.wikimedia.org/P42878 and previous config saved to /var/cache/conftool/dbconfig/20230105-164612-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T17:31:33Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1161 (T326156)', diff saved to https://phabricator.wikimedia.org/P42883 and previous config saved to /var/cache/conftool/dbconfig/20230105-173133-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T17:31:54Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1185 (T326156)', diff saved to https://phabricator.wikimedia.org/P42884 and previous config saved to /var/cache/conftool/dbconfig/20230105-173154-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T17:34:08Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1185 (T326156)', diff saved to https://phabricator.wikimedia.org/P42885 and previous config saved to /var/cache/conftool/dbconfig/20230105-173408-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T18:19:28Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1185 (T326156)', diff saved to https://phabricator.wikimedia.org/P42888 and previous config saved to /var/cache/conftool/dbconfig/20230105-181928-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T18:19:49Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1200 (T326156)', diff saved to https://phabricator.wikimedia.org/P42889 and previous config saved to /var/cache/conftool/dbconfig/20230105-181949-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T18:22:05Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1200 (T326156)', diff saved to https://phabricator.wikimedia.org/P42890 and previous config saved to /var/cache/conftool/dbconfig/20230105-182204-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T19:07:24Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1200 (T326156)', diff saved to https://phabricator.wikimedia.org/P42893 and previous config saved to /var/cache/conftool/dbconfig/20230105-190724-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T19:08:31Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2111 (T326156)', diff saved to https://phabricator.wikimedia.org/P42894 and previous config saved to /var/cache/conftool/dbconfig/20230105-190830-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T19:10:47Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2111 (T326156)', diff saved to https://phabricator.wikimedia.org/P42895 and previous config saved to /var/cache/conftool/dbconfig/20230105-191046-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T19:56:06Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2111 (T326156)', diff saved to https://phabricator.wikimedia.org/P42898 and previous config saved to /var/cache/conftool/dbconfig/20230105-195606-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T19:56:27Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2123 (T326156)', diff saved to https://phabricator.wikimedia.org/P42899 and previous config saved to /var/cache/conftool/dbconfig/20230105-195627-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T19:58:44Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2123 (T326156)', diff saved to https://phabricator.wikimedia.org/P42900 and previous config saved to /var/cache/conftool/dbconfig/20230105-195843-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T20:44:03Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2123 (T326156)', diff saved to https://phabricator.wikimedia.org/P42903 and previous config saved to /var/cache/conftool/dbconfig/20230105-204403-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T20:44:39Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2128 (T326156)', diff saved to https://phabricator.wikimedia.org/P42904 and previous config saved to /var/cache/conftool/dbconfig/20230105-204438-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T20:46:55Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2128 (T326156)', diff saved to https://phabricator.wikimedia.org/P42905 and previous config saved to /var/cache/conftool/dbconfig/20230105-204654-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T21:32:14Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2128 (T326156)', diff saved to https://phabricator.wikimedia.org/P42908 and previous config saved to /var/cache/conftool/dbconfig/20230105-213214-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T21:32:36Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2137:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42909 and previous config saved to /var/cache/conftool/dbconfig/20230105-213235-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T21:33:52Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2137:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42910 and previous config saved to /var/cache/conftool/dbconfig/20230105-213351-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T22:19:11Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2137:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42913 and previous config saved to /var/cache/conftool/dbconfig/20230105-221911-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T22:19:33Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2157 (T326156)', diff saved to https://phabricator.wikimedia.org/P42914 and previous config saved to /var/cache/conftool/dbconfig/20230105-221932-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T22:20:48Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2157 (T326156)', diff saved to https://phabricator.wikimedia.org/P42915 and previous config saved to /var/cache/conftool/dbconfig/20230105-222048-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T23:06:08Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2157 (T326156)', diff saved to https://phabricator.wikimedia.org/P42918 and previous config saved to /var/cache/conftool/dbconfig/20230105-230607-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T23:06:29Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2171:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42919 and previous config saved to /var/cache/conftool/dbconfig/20230105-230629-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T23:07:45Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2171:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42920 and previous config saved to /var/cache/conftool/dbconfig/20230105-230745-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T23:53:05Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2171:3315 (T326156)', diff saved to https://phabricator.wikimedia.org/P42923 and previous config saved to /var/cache/conftool/dbconfig/20230105-235304-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T23:53:26Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2178 (T326156)', diff saved to https://phabricator.wikimedia.org/P42924 and previous config saved to /var/cache/conftool/dbconfig/20230105-235325-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-05T23:55:43Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2178 (T326156)', diff saved to https://phabricator.wikimedia.org/P42925 and previous config saved to /var/cache/conftool/dbconfig/20230105-235543-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-01-06T00:41:03Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2178 (T326156)', diff saved to https://phabricator.wikimedia.org/P42928 and previous config saved to /var/cache/conftool/dbconfig/20230106-004102-ladsgroup.json

We are down to this only now:

{
    "_metadata": {
        "time_end": 1673005418.0244887,
        "time_start": 1673005188.0962121
    },
    "swauthor swauthor_namesite_unique index-columns-mismatch": {
        "s3": [
            "db1157:dewikivoyage",
            "db1112:dewikivoyage",
            "db1123:dewikivoyage",
            "db1166:dewikivoyage",
            "db1175:dewikivoyage",
            "db1179:dewikivoyage",
            "db1189:dewikivoyage",
            "db1198:dewikivoyage",
            "db1157:itwikivoyage",
            "db1112:itwikivoyage",
            "db1123:itwikivoyage",
            "db1166:itwikivoyage",
            "db1175:itwikivoyage",
            "db1179:itwikivoyage",
            "db1189:itwikivoyage",
            "db1198:itwikivoyage"
        ]
    }
}
root@db1157.eqiad.wmnet[dewikivoyage]> alter table swauthor drop index if exists swauthor_namesite_unique, add UNIQUE INDEX swauthor_namesite_unique (swa_site, swa_user_name);
ERROR 1062 (23000): Duplicate entry '0-' for key 'swauthor_namesite_unique'

It seems there are some incorrect data there.

So the "swauthor swauthor_namesite_unique index-columns-mismatch" is still there.

On https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CreditsSource/+/31026 there was a change to add a new column

DROP /*i*/INDEX swauthor_namesite_unique ON /*_*/swauthor;
ALTER TABLE /*_*/swauthor
  CHANGE COLUMN swa_uri swa_uri_part varbinary(255) NOT NULL,
  CHANGE COLUMN swa_site swa_site int unsigned;
CREATE UNIQUE INDEX /*i*/swauthor_namesite_unique ON /*_*/swauthor (swa_site,swa_uri_part,swa_user_name);

The current abstract schema contains only two columns

UNIQUE INDEX swauthor_namesite_unique (swa_site, swa_user_name),

No idea what is on production.

Not sure if something was missed on creating the abstract schema, but the field swa_uri_part is not used in code (only similiar named column on other table srcwork_uri_part, that is also part of the unique index). The field was used by the maintenance script from the patch set above, but not outside of that.

You are right but at the same time, this table is completely unused. I don't know why it's in production even :/ Maybe we can drop these tables?

A bit of context: WikiVoyage was running running a very old MW version on postgres with a couple of custom extensions. There were a couple of Postgres-specific things that needed some refactoring before bringing to MySQL. Some extensions also shared tables, IIRC. CreditsSource was one of those extensions that were adopted when WikiVoyage was migrated to WMF and needed some tweaking.

Even in the original pre-migration extension code, swauthor was unused in code; only present in zsamm.sql
I'm going to assume that "zsamm" was some abbreviation of "zusammen" ("together" in German), so I'm guessing this particular table may have been in use in another extension.

The follow-up migration patch still makes no use of this table, other than in a maintenance script that migrates some data.
I think it's safe to say that this table is not in use in this extension & wasn't properly cleaned up (possibly because it was also in use in another extension, or out of an abundance of caution)

I combed through all other (remaining) WikiVoyage extensions and can't find swauthor remnants. CodeSearch also comes up blank.
I think it's safe to drop this table.

Thanks for the notes. We can drop it then.

Ladsgroup moved this task from In progress to Done on the DBA board.