Page MenuHomePhabricator

Use separate DB connection for (Sql/UpsertSql)IdGenerator in Wikibase
Closed, ResolvedPublic5 Estimated Story Points

Description

Details of the issue this is trying to solve can be found in T194299

Task details

@aaron Suggested to use a separate master DB connection for this (if were in a transaction and don't immediately autocommit), so that it never ends up in the main transaction. That might mean slightly more wasted IDs, but should significantly reduce contention.

openConnection is badly named and still reuses connections. You'd probably want getConnection with CONN_TRX_AUTO

Acceptance criteria

  • UpsertSqlIdGenerator can generate ids using a seperate master db connection
  • SqlIdGenerator can generate ids using a seperate master db connection
  • Use of a seperate master db connection is configurable
  • The default configuration is false

Event Timeline

Change 485859 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/Wikibase@master] Use separate DB connection for (Sql/UpsertSql)IdGenerator in Wikibase

https://gerrit.wikimedia.org/r/485859

Change 485859 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use separate DB connection for (Sql/UpsertSql)IdGenerator in Wikibase

https://gerrit.wikimedia.org/r/485859