summaryrefslogtreecommitdiff
path: root/releasenotes
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-11-28 12:20:46 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-12-05 11:49:14 -0500
commit009d23df45969036c70e4cf59eb4019aaace9a55 (patch)
tree4541c4fb24a99b5c14da107e43952e572f4da692 /releasenotes
parenta191d2e629f55c999b37a7a795ad6fbee2807b98 (diff)
downloadoslo-db-009d23df45969036c70e4cf59eb4019aaace9a55.tar.gz
Add option for wsrep_sync_wait
When using Galera, the wsrep_sync_wait option [1] can change the behavior of a variety of Galera DQL/DML statements such that a particular operation will pause until outstanding write-sets are fully persisted to the local node. The setting supersedes the previous boolean parameter wsrep_causal_reads which only affected SELECT, with an updated approach that allows for fine-grained control of so-called "causality checks" on individual statement types. The legacy-compatible setting of '1' indicates that READ/SELECT/BEGIN operations should proceed only after any pending writesets are fully available. The use case for this setting is for an application that is running operations on multiple Galera nodes simultaenously. An application that commits data on one node, and then immediately uses a different connection (on a potentially different node) to SELECT that data, may fail to see those changes if "causality checks" for SELECT are not enabled. While a COMMIT operation in Galera will block locally until all other nodes approve of the writeset, the operation does not block for the subsequent period of time when other nodes are actually persisting that writeset. Setting up "causal reads" in this case indicates that a SELECT operation will wait until any writesets in progress are available, thus maintaining serialization between the COMMIT and subsequent SELECT. As the name implies, wsrep_sync_wait adds...waiting! to the operation, and thus directly impacts performance by adding latency to SELECT operations or to the operations that have been selected for causality checks, to the degree that concurrent writesets are expected to be present. Since it's not expected that most if any Openstack applications actually need this setting in order to be effective with Galera multi-master operation, and as the setting is available within client session scope and also impacts performance, making it available on a per-application basis means that specific applications which may see issues under load can choose to enable this setting, much in the way any other "transaction isolation" settings might be made, without having to add a cluster-wide performance penalty by setting it at the Galera server level. [1] https://mariadb.com/docs/ent/ref/mdb/system-variables/wsrep_sync_wait/ Change-Id: Iee7afcac8ba952a2d67a9ad9dd0e4eae3f42518e
Diffstat (limited to 'releasenotes')
-rw-r--r--releasenotes/notes/add_wsrep_sync_wait-e3c5a9f4bc08b203.yaml8
1 files changed, 8 insertions, 0 deletions
diff --git a/releasenotes/notes/add_wsrep_sync_wait-e3c5a9f4bc08b203.yaml b/releasenotes/notes/add_wsrep_sync_wait-e3c5a9f4bc08b203.yaml
new file mode 100644
index 0000000..b61a80f
--- /dev/null
+++ b/releasenotes/notes/add_wsrep_sync_wait-e3c5a9f4bc08b203.yaml
@@ -0,0 +1,8 @@
+---
+features:
+ - |
+ Added new option mysql_wsrep_sync_wait which sets the Galera
+ "wsrep_sync_wait" variable on server login. This session-level variable
+ allows Galera to ensure that writesets are fully up to date before running
+ new queries, and may be used to tune application behavior when multiple
+ Galera masters are targeted for SQL operations simultaneously.