Have you checked data consistency between the nodes?
On 2015-04-01 00:00, Nils Martin Sande wrote:
> Hi, I'm having a weird problem with MariaDb Galera Server 10.0.17 (on
> centos 7 test and RHEL6.5 production).
>
> When writing a large list of rows to a table using an "insert on
> duplicate
> key update" statement committed data seems to be lost somewhere on the
> way.
> Basically my list may contain duplicate keys, and the update part of
> the
> statement simply checks the timestamp field of the two conflicting
> entries
> and updates fields when needed. To speed things up the inserts is done
> in
> batches of up to 10000 rows (one transaction per batch).
>
> Explanation of the fields in the summary below:
>
> - time - seconds in took to write all records to the db.
> - listSize - size of the list to be written to db.
> - keys - number of unique keys in the list.
> - inserts - number of statements which resulted in an insert
> (returned
> value 1)
> - actualSize - the actual size of the snapshot in the database,
> using
> "select count(*) ...."
> - duplicates - number of statements which resulted in update or
> no-change (return values 0 and 2)
>
> In short keys and inserts should be equal and inserts + duplicates
> should
> equal listSize, and actualSize should equal inserts.
>
> 1. Snapshot summary: time=34S, listSize=704762, keys=704696,
> inserts=704696, actualSize=704696, duplicates=66
> 2. Snapshot summary: time=32S, listSize=704762, keys=704696,
> inserts=704702, actualSize=674705, duplicates=60
> 3. Snapshot summary: time=32S, listSize=704762, keys=704696,
> inserts=704697, actualSize=694698, duplicates=65
> 4. Snapshot summary: time=39S, listSize=704762, keys=704696,
> inserts=704698, actualSize=694698, duplicates=64
>
> In the first example all is god. In the other examples something
> is very wrong. I have found the following:
>
>
> 1. Sending all writes to the same node fixes the problem (MaxScale
> RW
> Split), even with many batches written in parallel.
> 2. Only writing 1 batch at a time solves the problem. Increasing the
> batch parallelism increases the chance of inconsistencies.
> 3. Very small batch sizes decreases the chance of errors.