MariaDB master to master replication auto increment is not sequential
All(?) INSERTs, including IODKU and REPLACE can burn ids, leading to gaps.  This happens with the statement is rolled back.  And for INSERT IGNORE when some UNIQUE triggers &quot;ignore&quot;.
Even without multi-master, you can get AUTO_INCREMENT values out of order.  This is because the auto_inc is grabbed when needed, but not replicated until COMMITted.  Replicas will see the ids out of order.
Bottom line:  AUTO_INCREMENT guarantees uniqueness, nothing else.
(Also, what Gordan says.)