[Openstack] [designate]DBDeadlock of Designate

Taka Hatakeyama taka.hatakeyama at gmail.com
Sun Mar 15 16:44:21 UTC 2015


Hello,

My name is Taka Hatakeyama. We are working on Designate since last year.
We are using Designate for '20141003' Git Hub repository of Icehouse.
We have built Designate with mysql(Percona) cluster shown below.

    designate.conf                  designate.conf
      IP:xxx.xx.x.x                   IP:yyy.yy.y.y
          A-side                          B-side
  -----------------               -----------------
  | designate-api |               | designate-api |
  -----------------               -----------------
          |                               |
  -----------------    cluster    -----------------
  |   rabbitMQ    |---------------|   rabbitMQ    |
  -----------------               -----------------
          |                               |
  --------------------            --------------------
  | designate-central |           | designate-central |
  --------------------            --------------------
          |                               |
          |IP:xxx.xx.x.x                  |IP:yyy.yy.y.y
  ------------------   cluster    ------------------
  | mysql(Percona) |--------------| mysql(Percona) |
  ------------------              ------------------
          |                               |
          |                               |
  -----------------               -----------------
  |   PowerDNS    |               |    PowerDNS    |
  -----------------               -----------------

We have encountered DBDeadlock occurring problem in designate-central. It
occurs especially when it accesses some certain record called 'records'.

Also, it occurs when 'commit' of UPDATE, at one time. And it occurs when
SELECT, at some other time. We have found these two so far when it gets
deadlocked.

Transaction isolation level of mysql is 'REPEATABLE-READ' (which is
default) shown below.

mysql> select @@tx_isolation;
+-----------------+
| @@tx_isolation  |
+-----------------+
| REPEATABLE-READ |
+-----------------+
1 row in set (0.00 sec)


Here are my questions.

Question #1
I would like to know why DBDeadlock occurs in designate-central. If
DBDeadlock inevitably occurs, I would like to know how to handle this whole
Designate system better.

Question #2
I would like to know how to minimize DBDeadlock in Designate, if possible.

The point is, does a user need to retry same operation every time the first
operation failed by getting deadlocked? All we want to do is avoid letting
the user retry same operation after getting deadlocked.

Thank you in advance.

Best regards,
Taka Hatakeyama
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150316/12402a02/attachment.html>


More information about the Openstack mailing list