-
Notifications
You must be signed in to change notification settings - Fork 668
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
[1.5.2/1.5.3/1.5.4] Sync Failure due to Precondition Failed #1767
Comments
I asked to check if there are empty etags in the server db. CC @ogoffart |
@dragotin As I thought, I did ask for that information from the first user having the issue. They never responded with the information and then the issue went away and they closed the case. They reopened it a week later stating the issue was back, but still haven't received that data. Requested data from the current user. |
"Precondition failed" error happens if the etag sent by the client on upload differ from the one in the server. This may happen for two reason:
The case 1 is totaly normal and an error is expected, and should resolve by itself on next sync. The case 2 is more problematic and is not supposed to happen. Maybe the etag of a file changed on the server but the etag of the parent folders did not change recursively? maybe there is something else corrupted in the database. Perhaps, in this case, the client should clear all the parent folder's etag to avoid reading from db on next sync. |
maybe something to look at in 1.7 |
This seems to be the same issue as: owncloud/core#7479 Or, at least the same behavior. |
Yes, sounds like a good idea to clear the parents etags after the precondition failed problem appeared three times. Moved to 1.6.1 milestone. |
@dragotin Etags are all populated. There are no NULL's in the database |
I had an issue before that happened because my sync client (1.6.0 beta2) was interrupted by a Wifi failure after it had uploaded a file. It seems that the file itself got its etag properly saved in the DB but the sync client didn't have the correct local etag. My workaround was to move the broken file out of the sync folder, let it sync, then move it back again. |
Note: the explanation above is only what I think might have happened, I didn't check the logs to confirm this. |
@PVince81 could you investigate the following: if a file is uploaded, it needs to update the etag in the db, how "atomar" is that done? Is it possible that if two clients upload the same file at the same time that a concurrency situation can happen where we end up with a wrong etag that is passed back to the client? |
I imagine it could happen that between the time when the DB is updated and the etag is returned, another client could read out that new etag before the first request has returned. I'll check whether the etag is saved in the DB before or after the file operations (chunk assembling / part file renaming). In my case it was a small text file, but I had encryption enabled which might slow it down a bit. I don't think it's possible to do it in an atomic way, unless we use a DB transaction that gets close only at the very last moment when the response has been sent (CC @icewind1991) |
It is reported that the issue still exists in 1.6.1:
|
@ogoffart can you have a look? |
Was there two instance of the client open? |
@ser72 is this still a problem? |
@ser72 is that file smaller than 10 MB ? (no chunking involved) |
Closing: The original issue was fixed in 1.6.1. |
@ogoffart @dragotin @PVince81
|
As discovered recently, this is very likely to be related to the upload abort bug here: owncloud/core#9302 where it basically deletes the original file instead of the part file... |
I can also confirm about having to move out the file and put it back in to fix the issue. This is exactly what I had on my private owncloud. |
The files in question, are they new and need to be uploaded to the server? Or are that updates? |
@ser72 and I looked at logs and it seems like they were existing files to be overwritten. A patch was applied, now waiting for results. |
ok, so no need for me to investigate further?! Thanks @PVince81 |
Not for now, thanks @dragotin 😄 |
@ser72 has there been any news regarding this issue ? Or is it solved finally ? 😄 |
@PVince81 : So far so good. |
@FreeMinded But the files were modified in the same time on the server? Was it after upgrading? Did the client recover properly? |
@ogoffart I was testing upload and syncing through several channels (client for windows, upload as logged user and upload through public link). There were intentionally changes done on the server and local file at the same time. I was expecting to get a sync conflict. But the client produced the output mentioned above. It didn't recover. At least not within a decent time frame and I had te delete the file and upload it again. No upgrading was involved. |
Notes
3 separate users have reported that files fail to sync due to Precondition Failed.
Users have been on 1.5.2,1.5.3,1.5.4 clients
Unable to reproduce locally, however, these users seem to see the same files fail constantly. One reports the only way to get the file to sync is to remove it from the folder, then replace it into the folder.
logs
The client logs have no indication of an error. One user's client logs can be found:
s3/Support/customer-tickets-history/Precondition
That user sees the following in the server:
All users state they were the only ones syncing at the time and that the files exhibiting the error were NOT being modified on the server by anyone else.
@dragotin @danimo
The text was updated successfully, but these errors were encountered: