Page MenuHomePhabricator

User:FormalDude quit from mentorship, but their mentees were not reassigned
Closed, ResolvedPublic2 Estimated Story Points

Description

Originally reported at https://en.wikipedia.org/wiki/Wikipedia_talk:Growth_Team_features#Quit_mentorship_but_still_receiving_questions.

User:FormalDude, a former English Wikipedia mentor, quit from mentorship on December 11, 2023 (diff). However, mentees are still assigned to them (and Special:Log/growthexperiments shows no reassignments happening), see the API or a database query below:

mysql:research@dbstore1005.eqiad.wmnet [enwiki]> select count(*) from growthexperiments_mentor_mentee where gemm_mentor_role='primary' and gemm_mentor_id=30481996;
+----------+
| count(*) |
+----------+
|    30957 |
+----------+
1 row in set (0.036 sec)

mysql:research@dbstore1005.eqiad.wmnet [enwiki]>

To remedy the issue, they tried to re-enroll to be able to quit again, but that did not help. After that, User: Extraordinary Writ (an English Wikipedia administrator) tried to do the same (removal diff), with no luck. To verify, @Urbanecm_WMF tried to take the same action, again unsuccessfully.

Since T288878, we expect quitting mentorship to trigger a mass reassignment of mentees, see https://en.wikipedia.org/wiki/Special:Log/growthexperiments/Stewpot as an example. However, despite trying several times, this does not happen here.

Within this task, we should ensure User:FormalDude's mentees are reassigned, since that is requested by the mentor, see https://en.wikipedia.org/wiki/Wikipedia_talk:Growth_Team_features#Quit_mentorship_but_still_receiving_questions.

Event Timeline

Urbanecm_WMF set the point value for this task to 2.

Given my attempt to remedy the issue on-wiki by removing the mentor once again was not successful, I investigated this a bit more deeply. I found out that the reassignMenteesJob job gets scheduled as-expected, but it does not finish its job. Querying Logstash shows the following log entry:

Jan 2, 2024 @ 20:31:27.773 Exception executing job: reassignMenteesJob Special: mentorId=30481996 performerId=36735309 reassignMessageKey=growthexperiments-quit-mentorship-reassign-mentees-log-message-removed reassignMessageAdditionalParams=["Martin Urbanec (WMF)"] requestId=0e019bc7-fe10-4702-97a3-95e530fadcb9 : Wikimedia\RequestTimeout\RequestTimeoutException: The maximum execution time of 200 seconds was exceeded

from /srv/mediawiki/php-1.42.0-wmf.10/vendor/wikimedia/request-timeout/src/Detail/ExcimerTimerWrapper.php(59)
#0 /srv/mediawiki/php-1.42.0-wmf.10/vendor/wikimedia/request-timeout/src/Detail/ExcimerRequestTimeout.php(34): Wikimedia\RequestTimeout\Detail\ExcimerTimerWrapper->exitCriticalSection(integer)
#1 /srv/mediawiki/php-1.42.0-wmf.10/vendor/wikimedia/request-timeout/src/CriticalSectionProvider.php(134): Wikimedia\RequestTimeout\Detail\ExcimerRequestTimeout->exitCriticalSection(integer)
#2 /srv/mediawiki/php-1.42.0-wmf.10/vendor/wikimedia/request-timeout/src/CriticalSectionScope.php(57): Wikimedia\RequestTimeout\CriticalSectionProvider->Wikimedia\RequestTimeout\{closure}(integer)
#3 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/database/Database.php(3150): Wikimedia\RequestTimeout\CriticalSectionScope->exit()
#4 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/database/Database.php(725): Wikimedia\Rdbms\Database->completeCriticalSection(string, Wikimedia\RequestTimeout\CriticalSectionScope)
#5 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/database/Database.php(640): Wikimedia\Rdbms\Database->executeQuery(Wikimedia\Rdbms\Query, string, integer)
#6 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/database/Database.php(1347): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#7 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/database/Database.php(1356): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
#8 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/database/DBConnRef.php(119): Wikimedia\Rdbms\Database->selectRow(array, array, array, string, array, array)
#9 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/database/DBConnRef.php(369): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#10 /srv/mediawiki/php-1.42.0-wmf.10/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(756): Wikimedia\Rdbms\DBConnRef->selectRow(array, array, array, string, array, array)
#11 /srv/mediawiki/php-1.42.0-wmf.10/includes/user/UserSelectQueryBuilder.php(262): Wikimedia\Rdbms\SelectQueryBuilder->fetchRow()
#12 /srv/mediawiki/php-1.42.0-wmf.10/includes/user/ActorStore.php(259): MediaWiki\User\UserSelectQueryBuilder->fetchUserIdentity()
#13 /srv/mediawiki/php-1.42.0-wmf.10/extensions/GrowthExperiments/includes/Mentorship/Provider/StructuredMentorProvider.php(175): MediaWiki\User\ActorStore->getUserIdentityByUserId(integer)
#14 /srv/mediawiki/php-1.42.0-wmf.10/extensions/GrowthExperiments/includes/Mentorship/MentorPageMentorManager.php(231): GrowthExperiments\Mentorship\Provider\StructuredMentorProvider->getWeightedAutoAssignedMentors()
#15 /srv/mediawiki/php-1.42.0-wmf.10/extensions/GrowthExperiments/includes/Mentorship/ReassignMentees.php(140): GrowthExperiments\Mentorship\MentorPageMentorManager->getRandomAutoAssignedMentor(MediaWiki\User\UserIdentityValue)
#16 /srv/mediawiki/php-1.42.0-wmf.10/extensions/GrowthExperiments/includes/Mentorship/ReassignMenteesJob.php(88): GrowthExperiments\Mentorship\ReassignMentees->doReassignMentees(string, string)
#17 /srv/mediawiki/php-1.42.0-wmf.10/extensions/EventBus/includes/JobExecutor.php(80): GrowthExperiments\Mentorship\ReassignMenteesJob->run()
#18 /srv/mediawiki/rpc/RunSingleJob.php(60): MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#19 {main}

So, we're dealing with the job not being able to finish within 200 seconds. That'd make sense.

Mentioned in SAL (#wikimedia-operations) [2024-01-02T20:52:00Z] <urbanecm> mwmaint2002: mwscript extensions/GrowthExperiments/maintenance/reassignMentees.php --wiki=enwiki --mentor 'FormalDude' --performer 'Martin Urbanec (WMF)' (T354220)

I workarounded the problem by triggering the reassignment on the server side. I also filled T354222: reassignMenteesJob is not able to finish in time when a mentor has too many mentees assigned for the Growth team to come up with a long-term solution, since quitting should work the same regardless of how many mentees you happen to have assigned.

Mentioned in SAL (#wikimedia-operations) [2024-01-02T22:42:38Z] <urbanecm> mwmaint2002: Restart mwscript extensions/GrowthExperiments/maintenance/reassignMentees.php --wiki=enwiki --mentor 'FormalDude' --performer 'Martin Urbanec (WMF)' (T354220)