[Kmymoney-devel] [Bug 257544] New: Duplicate id values in db mode (mysql) on bidirectional replication

lazabt lazabt at yandex.ru
Sun Nov 21 20:20:29 CET 2010


https://bugs.kde.org/show_bug.cgi?id=257544

           Summary: Duplicate id values in db mode (mysql) on
                    bidirectional replication
           Product: kmymoney4
           Version: 4.5
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: kmymoney-devel at kde.org
        ReportedBy: lazabt at yandex.ru


Version:           4.5 (using KDE 4.5.3) 
OS:                Linux

I'm trying to use KMyMoney in such a way:
There are two computers (A and B) with two standalone mysql databases
controlled by KMM. A and B are in one LAN, databases set up to replicate on
each other (DB at A->DB at B, DB at B->DB at A), and there's no database server always
turned on. So when the computers are online, all changes doing in each copy of
KMM DB replicate to another DB copy, DBs are in sync.
The problems start in the case described in "steps to reproduce": on step 3 we
get replication conflict because DB at A and DB at B have records with the same IDs.
It's a known problem of replication with autoincrement IDs in general and it's
generally solved by setting different offsets and step=2 (for two DBs) of
autoincrement sequences on DB level. E.g.:
IDs of DB at A: offset=1 step=2 (id sequence: 1, 3, 5, 7, 9, ...)
IDs of DB at B: offset=2 step=2 (id sequence: 2, 4, 6, 8, 10, ...)
But KMM controls autoincrementing by itself (because of prefixed IDs and
different storage formats I suppose) so the problem is here.
Could you please add the feature of setting up offset and step of IDs: to IDs
generation logic and to user interface.

Reproducible: Always

Steps to Reproduce:
step 1. A is on, B is off, user adds a new transaction in KMM at A
step 2. A is off, B is on, user adds a new transaction in KMM at B
step 3. A is on, B is on, DBs tries to sync

Actual Results:  
Replication conflict

Expected Results:  
DBs at A and B are in sync

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list