df2a5275eb
The SQLAlchemy recommends to use populate_existing() when using with_for_update() [0], it fixed issues with the caching of the objects. This patch precisely fixes a bug when locking of a loadbalancer in the batch member update API call, the load balancer might not have been locked correctly and race conditions could have occurred (processing simultaneously 2 requests in the workers for the same load balancer). [0] https://docs.sqlalchemy.org/en/14/orm/query.html#sqlalchemy.orm.Query.with_for_update Story 2010646 Task 47642 Co-Authored-By: Gaudenz Steinlin <gaudenz.steinlin@cloudscale.ch> Merge conflict: octavia/db/repositories.py Change-Id: Ibd4da09079e83789d6cfe3658fcf1f266f5cf8b4 (cherry picked from commit 2e4ee9c65e0fba660b0316f1f4203810bb8a67c0)
6 lines
151 B
YAML
6 lines
151 B
YAML
---
|
|
fixes:
|
|
- |
|
|
Fixed a potential race condition in the member batch update API call, the
|
|
load balancers might not have been locked properly.
|