Page MenuHomePhabricator

SearchEngineTest: failures when run concurrently with non-database group PHPUnit tests
Open, Needs TriagePublic

Description

This patch https://gerrit.wikimedia.org/r/c/integration/quibble/+/758783 proposes to run databaseless, standalone and database group PHPUnit tests concurrently. That seems to work for core and extension tests using MySQL, but there is a failure when run with SQLite. In SQLite, there are 7 errors for SearchEngineTest (https://integration.wikimedia.org/ci/job/integration-quibble-fullrun-sqlite/39/console#console-section-4)

00:07:23.882 There were 2 errors:
00:07:23.882 
00:07:23.882 1) SearchEngineTest::testPhraseSearchHighlight
00:07:23.882 Error: Call to a member function getIterator() on null
00:07:23.882 
00:07:23.882 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:191
00:07:23.882 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.882 === Logs generated by test case
00:07:23.882 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.882 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.882 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.882 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.882 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.882 ===
00:07:23.882 
00:07:23.882 2) SearchEngineTest::testAugmentorSearch
00:07:23.882 TypeError: Argument 1 passed to SearchEngine::augmentSearchResults() must implement interface ISearchResultSet, null given, called in /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php on line 341
00:07:23.882 
00:07:23.882 /workspace/src/includes/search/SearchEngine.php:829
00:07:23.882 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:341
00:07:23.882 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.882 === Logs generated by test case
00:07:23.882 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.882 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.882 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.882 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.882 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.882 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.882 [localisation] [debug] LocalisationCache::isExpired(en): cache missing, need to make one []
00:07:23.882 ===
00:07:23.882 
00:07:23.882 --
00:07:23.882 
00:07:23.882 There were 7 failures:
00:07:23.882 
00:07:23.882 1) SearchEngineTest::testFullWidth
00:07:23.882 Failed asserting that null is of type "object".
00:07:23.882 
00:07:23.882 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:101
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:119
00:07:23.883 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.883 === Logs generated by test case
00:07:23.883 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.883 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.883 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.883 ===
00:07:23.883 
00:07:23.883 2) SearchEngineTest::testTextSearch
00:07:23.883 Failed asserting that null is of type "object".
00:07:23.883 
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:101
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:138
00:07:23.883 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.883 === Logs generated by test case
00:07:23.883 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.883 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.883 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.883 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.883 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.883 ===
00:07:23.883 
00:07:23.883 3) SearchEngineTest::testWildcardSearch
00:07:23.883 Failed asserting that null is of type "object".
00:07:23.883 
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:101
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:146
00:07:23.883 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.883 === Logs generated by test case
00:07:23.883 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.883 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.883 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.883 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.883 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.883 ===
00:07:23.883 
00:07:23.883 4) SearchEngineTest::testPhraseSearch
00:07:23.883 Failed asserting that null is of type "object".
00:07:23.883 
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:101
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:172
00:07:23.883 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.883 === Logs generated by test case
00:07:23.883 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.883 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.883 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.883 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.883 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.883 ===
00:07:23.883 
00:07:23.883 5) SearchEngineTest::testTextPowerSearch
00:07:23.883 Failed asserting that null is of type "object".
00:07:23.883 
00:07:23.883 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:101
00:07:23.884 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:205
00:07:23.884 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.884 === Logs generated by test case
00:07:23.884 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.884 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 [localisation] [debug] LocalisationCache::isExpired(en): cache missing, need to make one []
00:07:23.884 ===
00:07:23.884 
00:07:23.884 6) SearchEngineTest::testTitleSearch
00:07:23.884 Failed asserting that null is of type "object".
00:07:23.884 
00:07:23.884 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:101
00:07:23.884 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:215
00:07:23.884 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.884 === Logs generated by test case
00:07:23.884 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.884 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 ===
00:07:23.884 
00:07:23.884 7) SearchEngineTest::testTextTitlePowerSearch
00:07:23.884 Failed asserting that null is of type "object".
00:07:23.884 
00:07:23.884 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:101
00:07:23.884 /workspace/src/tests/phpunit/includes/search/SearchEngineTest.php:227
00:07:23.884 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:457
00:07:23.884 === Logs generated by test case
00:07:23.884 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:07:23.884 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:07:23.884 [localisation] [debug] LocalisationCache::isExpired(en): cache missing, need to make one []
00:07:23.884 ===
00:07:23.884 
00:07:23.884 ERRORS!
00:07:23.884 Tests: 8961, Assertions: 99559, Errors: 2, Failures: 7, Skipped: 35, Incomplete: 3.

Basically, anything using $this->search->searchText() is getting null back instead of an object. The same errors occur on two runs of this job, so even though this is triggered by the code being run in parallel with another process, it's deterministic in which tests fail.

Event Timeline

Change 768053 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/core@master] DNM: Checking searchInternal with SearchSqlite

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

From the debug logs:

[PHPUnit] Start test SearchEngineTest::testFullWidth
[MessageCache] MessageCache using store HashBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
[localisation] LocalisationCache using store LCStoreNull
[DBQuery] SearchSqlite::fulltextSearchSupported [0s] [Null]: SELECT  sql  FROM sqlite_master    WHERE tbl_name = 'unittest_searchindex'  LIMIT 1  
[PHPUnit] FAILURE in test SearchEngineTest::testFullWidth: Failed asserting that null is of type "object".
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[PHPUnit] Start test SearchEngineTest::testTextSearch
[objectcache] MainWANObjectCache using store EmptyBagOStuff
[localisation] LocalisationCache using store LCStoreNull
[MessageCache] MessageCache using store HashBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
[localisation] LocalisationCache using store LCStoreNull
[DBQuery] SearchSqlite::fulltextSearchSupported [0s] [Null]: SELECT  sql  FROM sqlite_master    WHERE tbl_name = 'unittest_searchindex'  LIMIT 1  
[PHPUnit] FAILURE in test SearchEngineTest::testTextSearch: Failed asserting that null is of type "object".

Compare with a run from a non-parallelized test:

[PHPUnit] Start test SearchEngineTest::testFullWidth
[MessageCache] MessageCache using store HashBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
[localisation] LocalisationCache using store LCStoreNull
[DBQuery] SearchSqlite::fulltextSearchSupported [0s] [Null]: SELECT  sql  FROM sqlite_master    WHERE tbl_name = 'unittest_searchindex'  LIMIT 1  
[localisation] LocalisationCache using store LCStoreNull
[objectcache] MainWANObjectCache using store EmptyBagOStuff
[DBQuery] SearchSqlite::searchInternal [0.001s] [Null]: SELECT unittest_searchindex.rowid, page_namespace, page_title FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0) LIMIT 11 
[DBQuery] SearchSqlite::searchInternal [0s] [Null]: SELECT COUNT(*) AS c FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0)
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Page\PageStore::getPageByNameViaLinkCache [0s] [Null]: SELECT  page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_touched,page_links_updated,page_latest,page_len,page_content_model,page_restrictions  FROM unittest_page    WHERE page_namespace = 0 AND page_title = 'FullOneUp'  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Page\PageStore::getPageByNameViaLinkCache [0s] [Null]: SELECT  page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_touched,page_links_updated,page_latest,page_len,page_content_model,page_restrictions  FROM unittest_page    WHERE page_namespace = 0 AND page_title = 'FullTwoLow'  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Page\PageStore::getPageByNameViaLinkCache [0s] [Null]: SELECT  page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_touched,page_links_updated,page_latest,page_len,page_content_model,page_restrictions  FROM unittest_page    WHERE page_namespace = 0 AND page_title = 'HalfOneUp'  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Page\PageStore::getPageByNameViaLinkCache [0s] [Null]: SELECT  page_id,page_namespace,page_title,page_is_redirect,page_is_new,page_touched,page_links_updated,page_latest,page_len,page_content_model,page_restrictions  FROM unittest_page    WHERE page_namespace = 0 AND page_title = 'HalfTwoLow'  LIMIT 1  
[DBQuery] SearchSqlite::fulltextSearchSupported [0s] [Null]: SELECT  sql  FROM sqlite_master    WHERE tbl_name = 'unittest_searchindex'  LIMIT 1  
[DBQuery] SearchSqlite::searchInternal [0s] [Null]: SELECT unittest_searchindex.rowid, page_namespace, page_title FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0) LIMIT 11 
[DBQuery] SearchSqlite::searchInternal [0s] [Null]: SELECT COUNT(*) AS c FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0)
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[DBQuery] SearchSqlite::fulltextSearchSupported [0s] [Null]: SELECT  sql  FROM sqlite_master    WHERE tbl_name = 'unittest_searchindex'  LIMIT 1  
[DBQuery] SearchSqlite::searchInternal [0s] [Null]: SELECT unittest_searchindex.rowid, page_namespace, page_title FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0) LIMIT 11 
[DBQuery] SearchSqlite::searchInternal [0s] [Null]: SELECT COUNT(*) AS c FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0)
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[DBQuery] SearchSqlite::fulltextSearchSupported [0s] [Null]: SELECT  sql  FROM sqlite_master    WHERE tbl_name = 'unittest_searchindex'  LIMIT 1  
[DBQuery] SearchSqlite::searchInternal [0s] [Null]: SELECT unittest_searchindex.rowid, page_namespace, page_title FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0) LIMIT 11 
[DBQuery] SearchSqlite::searchInternal [0s] [Null]: SELECT COUNT(*) AS c FROM unittest_page,unittest_searchindex WHERE page_id=unittest_searchindex.rowid AND  si_text MATCH 'az '  AND page_namespace IN (0)
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'FullTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfOneUp' AND (rev_id=page_latest)  LIMIT 1  
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0
[DBQuery] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds [0s] [Null]: SELECT  rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS "rev_comment_text",comment_rev_comment.comment_data AS "rev_comment_data",comment_rev_comment.comment_id AS "rev_comment_cid",actor_rev_user.actor_user AS "rev_user",actor_rev_user.actor_name AS "rev_user_text",temp_rev_user.revactor_actor AS "rev_actor",page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name  FROM unittest_revision JOIN unittest_revision_comment_temp "temp_rev_comment" ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN unittest_comment "comment_rev_comment" ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN unittest_revision_actor_temp "temp_rev_user" ON ((temp_rev_user.revactor_rev = rev_id)) JOIN unittest_actor "actor_rev_user" ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) JOIN unittest_page ON ((page_id = rev_page)) LEFT JOIN unittest_user ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user))   WHERE page_namespace = 0 AND page_title = 'HalfTwoLow' AND (rev_id=page_latest)  LIMIT 1  
[PHPUnit] Successful test SearchEngineTest::testFullWidth, completed in 0.018149 seconds

Random idea: perhaps the search engine asks LoadBalancer for a "different" (somehow) connection, and under MySQL it ends up getting back the conenction with the fake tables again, but under SQLite for some reason it gets back a new real connection, which doesn't have the fake tables? That would trigger a DBError. Perhaps that exception gets caught and turned into a null return value?

Random idea: perhaps the search engine asks LoadBalancer for a "different" (somehow) connection, and under MySQL it ends up getting back the conenction with the fake tables again, but under SQLite for some reason it gets back a new real connection, which doesn't have the fake tables? That would trigger a DBError. Perhaps that exception gets caught and turned into a null return value?

Thanks for looking into it. Perhaps that is what is going on. Unfortunately, I have no idea how to debug this to be able to determine the root cause. Would it be OK to move https://gerrit.wikimedia.org/r/c/mediawiki/core/+/768053/ forward which skips these tests on SQLite?

Change 768053 merged by jenkins-bot:

[mediawiki/core@master] Skip some SearchEngineTest/SpecialSearchTest tests on SQLite

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