• Jan Lindström's avatar
    MDEV-30413 : run sequence nextval got [Note] WSREP: MDL BF-BF conflict and [ERROR] Aborting · 169def14
    Jan Lindström authored
    Sequence objects are implemented using special tables.
    These tables do not have primary key and only one row.
    NEXTVAL is basically update from existing value to new
    value. In Galera this could mean that two write-sets
    from different nodes do not conflict and this could
    lead situation where write-sets are executed
    concurrently and possibly in wrong seqno order.
    
    This is fixed by using table-level exclusive key for
    SEQUENCE updates. Note that this naturally works
    correctly only if InnoDB storage engine is used for
    sequence.
    
    This fix does not contain a test case because while
    it is possible to syncronize appliers using dbug_sync
    it was too hard to syncronize MDL-lock requests to
    exact objects. Testing done for this fix is documented
    on MDEV.
    Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
    169def14
row0ins.cc 104 KB