After rolling out 1.31.0-wmf.22 to group1 wikis I immediately saw ~200 errors per second like the following:
Exception: Database is read-only: The database has been automatically locked while the replica database servers catch up to the master.
File : Line: /srv/mediawiki/php-1.31.0-wmf.22/includes/libs/rdbms/database/Database.php:920
Stack:
#0 /srv/mediawiki/php-1.31.0-wmf.22/includes/libs/rdbms/database/Database.php(1622): Wikimedia\Rdbms\Database->query(string, string) #1 [internal function]: Wikimedia\Rdbms\Database->insert(string, array, string) #2 /srv/mediawiki/php-1.31.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(49): call_user_func_array(array, array) #3 /srv/mediawiki/php-1.31.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(312): Wikimedia\Rdbms\DBConnRef->__call(string, array) #4 /srv/mediawiki/php-1.31.0-wmf.22/includes/externalstore/ExternalStoreDB.php(97): Wikimedia\Rdbms\DBConnRef->insert(string, array, string) #5 /srv/mediawiki/php-1.31.0-wmf.22/includes/externalstore/ExternalStore.php(194): ExternalStoreDB->store(string, string) #6 /srv/mediawiki/php-1.31.0-wmf.22/includes/externalstore/ExternalStore.php(167): ExternalStore::insertWithFallback(array, string, array) #7 /srv/mediawiki/php-1.31.0-wmf.22/includes/Storage/SqlBlobStore.php(218): ExternalStore::insertToDefault(string) #8 /srv/mediawiki/php-1.31.0-wmf.22/includes/Storage/RevisionStore.php(361): MediaWiki\Storage\SqlBlobStore->storeBlob(string, array) #9 /srv/mediawiki/php-1.31.0-wmf.22/includes/Revision.php(1097): MediaWiki\Storage\RevisionStore->insertRevisionOn(MediaWiki\Storage\MutableRevisionRecord, Wikimedia\Rdbms\DatabaseMysqli) #10 /srv/mediawiki/php-1.31.0-wmf.22/includes/page/WikiPage.php(1918): Revision->insertOn(Wikimedia\Rdbms\DatabaseMysqli) #11 /srv/mediawiki/php-1.31.0-wmf.22/includes/page/WikiPage.php(1673): WikiPage->doCreate(WikitextContent, integer, User, string, array) #12 /srv/mediawiki/php-1.31.0-wmf.22/includes/filerepo/file/LocalFile.php(1653): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User) #13 /srv/mediawiki/php-1.31.0-wmf.22/includes/deferred/AutoCommitUpdate.php(42): Closure$LocalFile::recordUpload2(Wikimedia\Rdbms\DatabaseMysqli, string) #14 /srv/mediawiki/php-1.31.0-wmf.22/includes/deferred/DeferredUpdates.php(259): AutoCommitUpdate->doUpdate() #15 /srv/mediawiki/php-1.31.0-wmf.22/includes/deferred/DeferredUpdates.php(210): DeferredUpdates::runUpdate(AutoCommitUpdate, Wikimedia\Rdbms\LBFactoryMulti, string, integer) #16 /srv/mediawiki/php-1.31.0-wmf.22/includes/deferred/DeferredUpdates.php(127): DeferredUpdates::execute(array, string, integer) #17 /srv/mediawiki/php-1.31.0-wmf.22/includes/MediaWiki.php(606): DeferredUpdates::doUpdates(string, integer) #18 /srv/mediawiki/php-1.31.0-wmf.22/includes/api/ApiMain.php(557): MediaWiki::preOutputCommit(DerivativeContext) #19 /srv/mediawiki/php-1.31.0-wmf.22/includes/api/ApiMain.php(513): ApiMain->executeActionWithErrorHandling() #20 /srv/mediawiki/php-1.31.0-wmf.22/api.php(94): ApiMain->execute() #21 /srv/mediawiki/w/api.php(3): include(string) #22 {main}
Oddly, it also seems to have triggered a ton of Notice: Array to string conversion in /srv/mediawiki/php-1.31.0-wmf.21/includes/libs/rdbms/database/position/MySQLMasterPos.php on line 41 but it indicates the old branch, wmf.21 so I'm not sure how these are related.
Rolling back to wmf.21 caused the errors to immediately cease.