Skip to content

Commit b1fd143

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Replace deprecated with_lockmode with with_for_update"
2 parents 707deb1 + f1532cd commit b1fd143

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nova/db/sqlalchemy/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ def floating_ip_update(context, address, values):
11431143
def dnsdomain_get(context, fqdomain):
11441144
return model_query(context, models.DNSDomain, read_deleted="no").\
11451145
filter_by(domain=fqdomain).\
1146-
with_lockmode('update').\
1146+
with_for_update().\
11471147
first()
11481148

11491149

@@ -3106,7 +3106,7 @@ def network_query(project_filter, id=None):
31063106
filter_kwargs['id'] = id
31073107
return model_query(context, models.Network, read_deleted="no").\
31083108
filter_by(**filter_kwargs).\
3109-
with_lockmode('update').\
3109+
with_for_update().\
31103110
first()
31113111

31123112
if not force:

0 commit comments

Comments
 (0)