Closed Bug 1951478 Opened 18 days ago Closed 17 days ago

BMO ETL: Add a timestamp to lock table and remove lock if timestamp is greater than a day

Categories

(bugzilla.mozilla.org :: Extensions, enhancement)

Production
enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently if a export fails before the lock table can be cleared, any subsequent exports will not run as the lock will never be removed. Since a new day is a new export in ETL, we can just clear the lock anyway if it is greater than 24 hours and try again even if it fails the same way.

Would it be possible instead to clear the lock even if there's a failure?

Flags: needinfo?(dkl)

(In reply to :glob ✱ from comment #1)

Would it be possible instead to clear the lock even if there's a failure?

Maybe but I would need to put all of the SQL statements in try/catch blocks and create a timer that will kill a query after some period of time has passed. The removal of old locks seemed to be the quickest solution at the time. The problem is the container is stopping a query sometimes in the middle without any error message of any kind. And the container either stays stuck like that or dies completely. The script would not be able to remove the lock without some sort of watchdog.

Flags: needinfo?(dkl)

Authored by https://github.com/dklawren
https://github.com/mozilla-bteam/bmo/commit/fc9ef42ca191a8b235863ea88a77ad45ed1fefc2
[master] Bug 1951478 - BMO ETL: Add a timestamp to lock table and remove lock if timestamp is greater than a day

Status: ASSIGNED → RESOLVED
Closed: 17 days ago
Resolution: --- → FIXED
Blocks: 1922985
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: