Closed Bug 1832083 Opened 3 years ago Closed 3 years ago

landing_job row lock is not released when queue is empty

Categories

(Conduit :: Lando, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zeid, Assigned: zeid)

Details

Attachments

(1 file)

This lock is present even if the query returns an empty result, and could cause any migration on the landing_job table to hang forever if in maintenance mode.

>>> LandingJob.next_job_for_update_query(["m-c"]).first()
>>> db.session.execute("select pid, relation, granted, mode from pg_locks where relation=42264").fetchall()
[(27069, 42264, True, 'RowShareLock')]
>>> db.session.commit()
>>> db.session.execute("select pid, relation, granted, mode from pg_locks where relation=42264").fetchall()
[]
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: