Skip to content

Commit e7c152a

Browse files
[batch] Do not lock when querying billing projects (#14443)
Decided to tackle this as it was causing noise in the logs. There is no reason this read-only select query should lock any rows.
1 parent eaccef4 commit e7c152a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

batch/batch/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ async def query_billing_projects_with_cost(db, user=None, billing_project=None)
157157
) AS usage_t
158158
LEFT JOIN resources ON resources.resource_id = usage_t.resource_id
159159
) AS cost_t ON TRUE
160-
{where_condition}
161-
LOCK IN SHARE MODE;
160+
{where_condition};
162161
"""
163162

164163
billing_projects = []

0 commit comments

Comments
 (0)