Skip to content

Commit

Permalink
[batch] Do not lock when querying billing projects (#14443)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
daniel-goldstein authored Apr 4, 2024
1 parent eaccef4 commit e7c152a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions batch/batch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ async def query_billing_projects_with_cost(db, user=None, billing_project=None)
) AS usage_t
LEFT JOIN resources ON resources.resource_id = usage_t.resource_id
) AS cost_t ON TRUE
{where_condition}
LOCK IN SHARE MODE;
{where_condition};
"""

billing_projects = []
Expand Down

0 comments on commit e7c152a

Please sign in to comment.