Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for DB writes to propagate (causality checks)
Because we deploy the database in multi-master mode we can have cases where reading data from the DB fails after the data was written to another galera master node. We saw this happening during Flavor creation where nova first creates the flavor in the DB then the notification sending code tries to read back the flavor projects from the DB and the query fails as the flavor is not found. In this patch we change the default value on the DB engine to wait for previous write to sync before read. This will have a performance impact. We use `mysql_wsrep_sync_wait` from oslo.db [1] setting it to 1 as per the documented values of this parameter in the DBMS [2][3]. [1]: https://opendev.org/openstack/oslo.db/commit/009d23df45969036c70e4cf59eb4019aaace9a55 [2]: https://mariadb.com/docs/server/ref/mdb/system-variables/wsrep_sync_wait/ [3]: https://galeracluster.com/library/documentation/mysql-wsrep-options.html Fixes: https://issues.redhat.com/browse/OSPRH-7198
- Loading branch information