Changes uploaded but not applied on the server? #744
-
Hello, we ran into a critical issue, where changes are selected on the client and uploaded to the server however on the server, they are not applied and no error is reported back leading to data loss. I have been wondering what could cause such behavior? Below is the JSON result of a sync we log. It shows total uploaded changes as 1060 (which is a sum of all the changes selected on the client), however only the very last table is actually being applied and this is the only data we have. We have around 70 users syncing data multiple times per day and only twice has this happen so far however I fear more of those issues will appear. Any ideas or tips where to look for an issue? {
"SessionId": "e6852570-e39e-4a87-851b-baf96e56d077",
"StartTime": "2022-06-06T12:33:16.354775Z",
"ScopeName": null,
"CompleteTime": "2022-06-06T12:37:07.885707Z",
"TotalChangesApplied": 2363,
"TotalChangesDownloaded": 2363,
"TotalChangesUploaded": 1060,
"TotalResolvedConflicts": 297,
"TotalSyncErrors": 0,
"ChangesAppliedOnServer": {
"tca": [
{
"tn": "PROD_Dobavnica_History",
"sn": "",
"st": 16,
"rc": 0,
"a": 331,
"f": 0,
"trc": 1060,
"tac": 331
}
]
},
"ChangesAppliedOnClient": {
... removed ...
},
"SnapshotChangesAppliedOnClient": null,
"ClientChangesSelected": {
"tcs": [
{
"n": "CL_CrtnaKoda",
"s": "",
"u": 134
},
{
"n": "PROD_Dobavnica",
"s": "",
"u": 10
},
{
"n": "PROD_DobavnicaArtikel",
"s": "",
"u": 136
},
{
"n": "PROD_RealiziraneKolicineMerilecStaging",
"s": "",
"d": 4,
"u": 9
},
{
"n": "PROD_SifraDobavnice",
"s": "",
"u": 1
},
{
"n": "CL_CrtnaKoda_History",
"s": "",
"u": 279
},
{
"n": "PROD_SifraDobavnice_History",
"s": "",
"u": 11
},
{
"n": "PROD_DobavnicaArtikel_History",
"s": "",
"u": 145
},
{
"n": "PROD_Dobavnica_History",
"s": "",
"u": 331
}
]
},
"ServerChangesSelected": {
... removed ...
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Which version are you running ? |
Beta Was this translation helpful? Give feedback.
-
I was wondering; a couple weeks ago we implemented "CANCEL" option to our sync progress dialog - since sometimes sync took a while, we gave the user an option to cancel it so he/she could continue working. Could this somehow lead to weird behavior around that? We do nothing special, just pass CancellationTokenSource around and cancel it, however I did see it throws different Exception for cancelation, based on how long you wait before you cancel it (it can be SyncException, OperationCanceledException). Since applying is, as far as I know, done in transaction, this could probably be nothing, but I am taking a look at all of the features we implemented to see if there is a bug somewhere. Any info/details around that? :) |
Beta Was this translation helpful? Give feedback.
-
This issue occurs when syncing over HTTP on version 0.9.4. Issue: Only tables from the last request are applied, agent reports successful sync. This issue seemed to be connected to cleaning the batch folder, before the client got the response from the last request, could be a timeout or some network issue. To reproduce this issue, we have set a breakpoint inside the Workaround: Set I have tried to reproduce this issue on version 0.9.6 the same way. It seemed to be fixed, but I did not check if it was because the interceptor was invoked earlier in this version. @Mimetis do you have any insight if this could be an issue in later versions? |
Beta Was this translation helpful? Give feedback.
This issue occurs when syncing over HTTP on version 0.9.4.
Issue: Only tables from the last request are applied, agent reports successful sync.
This issue seemed to be connected to cleaning the batch folder, before the client got the response from the last request, could be a timeout or some network issue.
To reproduce this issue, we have set a breakpoint inside the
OnDatabaseChangesApplied
interceptor, which is invoked after cleaning the changes folder and waited for the request to timeout, then resumed the application. When a retry of the last request is sent from the client, only the changes from that request are applied and the sync finishes with no errors. However it is evident from …