select ... for update breaks with multi-writer galera

Bug #1321734 reported by Chris Ricker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cisco Openstack
Fix Released
High
Chris Ricker
Havana
Fix Released
High
Chris Ricker

Bug Description

The SQL construct "select ... for update" produces undefined results when used on galera databases with multiple writers

OpenStack uses this construct heavily in both nova and neutron, where it can lead to deadlock errors from the database

See the thread starting at http://lists.openstack.org/pipermail/openstack-dev/2014-May/035264.html for more details

Revision history for this message
Chris Ricker (chris-ricker) wrote :

To resolve for icehouse, we'll move to a variant of our current active-active multiple writer model

We'll still set up galera across 3 nodes but will configure the HAProxy VIP in front of galera to direct all writes to a single node, with the other two nodes configured as sequential backups to be written to only when the primary node is unavailable

This will avoid the undefined locking semantics seen when using "select ... for update" with multiple writers, but will still be HA

Revision history for this message
Chris Ricker (chris-ricker) wrote :
Revision history for this message
Chris Ricker (chris-ricker) wrote :

https://review.openstack.org/94738 for the full_ha changes

Revision history for this message
Chris Ricker (chris-ricker) wrote :
Revision history for this message
Chris Ricker (chris-ricker) wrote :

And yes, this is pretty ugly

Changed in openstack-cisco:
status: In Progress → Fix Committed
Changed in openstack-cisco:
status: Fix Committed → Fix Released
Revision history for this message
Chris Ricker (chris-ricker) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.