Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for DB writes to propagate (causality checks) #207

Conversation

gibizer
Copy link
Collaborator

@gibizer gibizer commented May 29, 2024

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 only saw issues happening in nova but we need strict consistency
during writing resource allocations to placement.

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.

Related: https://issues.redhat.com/browse/OSPRH-7198

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 only saw issues happening in nova but we need strict consistency
during writing resource allocations to placement.

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

Related: https://issues.redhat.com/browse/OSPRH-7198
@gibizer gibizer requested a review from SeanMooney May 29, 2024 15:49
@openshift-ci openshift-ci bot requested review from abays and olliewalsh May 29, 2024 15:49
@gibizer gibizer requested review from mrkisaolamb and removed request for olliewalsh and abays May 29, 2024 15:50
Copy link
Contributor

openshift-ci bot commented May 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gibizer, SeanMooney

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit a5b0bf4 into openstack-k8s-operators:main May 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants