#1 2023-02-14 13:46:54

avavdoshin
Member
Registered: 2022-11-16
Posts: 25

ab, please help with RecordVersionSynchroniseSlave

I have few classes with recordversion field (consts, dict, params, paramhistory) and want to periodically synchronise changes from master server to slave servers, but stuck with wrong recordversion logic.

AFAIK recordversion is monotonic for whole master server. All classes saves to database in mixed order and often updated. So now i have maximum recordversion for my tables, for example:

dict: 100302
consts: 169333
params: 169125
paramhistory: 169226

If i call RecordVersionSynchroniseSlave for my classes in order (just for example) dict, consts, params, paramhistory - tables "params" and "paramhistory" are never synchronised because of fRecordVersionMax, which now (after synchronisation consts class) is 169333.

Maybe i'm doing replication wrong way? I need offline synchronisation, real-time synchronisation not suitable for me.

P.S. Sorry for my lame english

Offline

#2 2023-02-15 09:36:47

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: ab, please help with RecordVersionSynchroniseSlave

We only validated it for a single TOrm table IIRC.

Offline

#3 2023-02-15 09:42:06

avavdoshin
Member
Registered: 2022-11-16
Posts: 25

Re: ab, please help with RecordVersionSynchroniseSlave

ab wrote:

We only validated it for a single TOrm table IIRC.

So it doesn't work for multiple TOrm tables?
So sad to hear it. I suppose it should be clarify in documentation.

Offline

#4 2023-02-15 11:25:53

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: ab, please help with RecordVersionSynchroniseSlave

It should work with multiple TOrm Table. Even if it was not tested as such.
So this is an issue.

I tried to fix https://github.com/synopse/mORMot2/issues/143
with https://github.com/synopse/mORMot2/commit/67c9c830

Please give your feedback with this latest commit.

Offline

#5 2023-02-15 12:30:24

avavdoshin
Member
Registered: 2022-11-16
Posts: 25

Re: ab, please help with RecordVersionSynchroniseSlave

It works now, thank you!

I closed issue.

Offline

Board footer

Powered by FluxBB