Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bidirectional Sync issue #718

Closed
AmalKRamachandran opened this issue Mar 23, 2022 · 5 comments
Closed

Bidirectional Sync issue #718

AmalKRamachandran opened this issue Mar 23, 2022 · 5 comments

Comments

@AmalKRamachandran
Copy link

We have 2 identical databases as server and client. We set the sync direction is bidirectional. When we update on the server it's affecting the client-side, but when we update at the client-side and sync it will not update at the server but also the client is updated with server data. Once any change is made at the server then we can't make any changes from the client side.

@Mimetis
Copy link
Owner

Mimetis commented Mar 23, 2022

can you try with the last release 0.9.4 and report if you still have the issue ?

If you are already on the 0.9.4, can you please share a simple repro, to help me reproduce your error ?

@AmalKRamachandran
Copy link
Author

We are trying to synchronize two identical databases bi-directionally. We need to synchronize a particular table/ data from server to client and vice versa. The data created in the client can be synchronized with sever and data created in the server can also be synchronized with the client. When we try to edit the data from the client, the change gets affected in the server. But once you edit and synchronize the data from the server, the changes from the client cannot be synchronized and do not affect in server. ie, After editing and synchronizing the data from the server, then the changes in the client do not have any effect on the server and the client also gets updated with the server data. Is it the normal way of bidirectional synchronization? We need to know is there any procedure to identify the last modified data in between and get updated in both server and client?

@AmalKRamachandran
Copy link
Author

This issue has been solved by Handling conflicts manually. We used ConflictResolution.MergeRow, and it's working as we expected. Thanks for your support.

@Vextamour
Copy link

Vextamour commented Apr 29, 2022

This issue has been solved by Handling conflicts manually. We used ConflictResolution.MergeRow, and it's working as we expected. Thanks for your support.

I believe I'm having this exact same issue. Could I please bother you with generic code on how you implemented this MergeRow? My issue is if I update data on server and the client SQLite database hasn't been synced to server because they were offline. If they come online before sync and they try to insert or update a row their SQLite database updates hits the server raises conflict and server overrides everything they had.

@Mimetis
Copy link
Owner

Mimetis commented Apr 30, 2022

Are you using auto increment identity column as primary key ?
If yes, just look at this thread #590, and revert back to GUID as primary keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants