Page MenuHomePhabricator

Tasks should clean up after themselves when they fail in STARTING phase
Closed, DeclinedPublic

Description

Tasks should clean up after themselves when SoftTimeLimitExceeded exception is raised.

If not a report (=task) will appear on the database with status STARTED when in fact will never complete, as it was cancelled (for taking too much time)

This is happening right now with PagesCreated and NamespaceCreated for enwiki

17911172014-10-21 00:00:00enwiki - PagesCreatedSTARTED
17911222014-10-22 00:00:00enwiki - PagesCreatedSTARTED

In the code we are handling properly reports left in stage "PENDING" but not started (which indicate that report could not even start really)


Version: unspecified
Severity: normal

Details

Reference
bz72563

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:53 AM
bzimport set Reference to bz72563.
bzimport added a subscriber: Unknown Object (MLST).
Nuria created this task.Oct 27 2014, 3:59 PM
Nuria added a comment.Oct 27 2014, 4:06 PM

Tasks should clean up after themselves when SoftTimeLimitExceeded exception is raised.

Taking this back, this is already happening. Now, what is missing is exceptions raised
within the STARTING or PENDING phase that are not related to tasks taking too long.

Any exception should mark task as "FAILURE" so a future run of the scheduler (if recurrent) can pick it up.

Nuria added a comment.Oct 27 2014, 4:08 PM

We likely need to catch all db errors via catching the highest level exception on sqlalchemy exception classes at the same level where we are catching now SoftTimeLimitExceeded

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 29 2015, 2:06 PM
mforns closed this task as Declined.Mar 26 2019, 2:47 PM

Declining because Wikimetrics is being discontinued. See: T211835.

Restricted Application added a project: Analytics. · View Herald TranscriptMar 26 2019, 2:47 PM