-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Two pushes of the same file at about the same time result in no changes in the etag. #7802
Comments
Hmm. I´m not sure the server guarantees that etags are unique between files. @dragotin What do you think? |
I Forgot to mention that it is the same file. |
The same etag for two subsequente PUTs on the same file is a bug of death. For two different files, it would probably be ok, but still not nice. |
The etag is generated using uniqid() - http://php.net/manual/en/function.uniqid.php And there is a big red warning on the documentation:
|
|
Does that mean if one executes uniqid() in the same microsecond on two different php processes it can return the same value? @ogoffart this occurred while testing parallel upload I assume? |
No, this was running the client tests perl scripts. |
in this case I assume a server side issue where we use a not-yet-updated etag |
I'll take care of this |
uniqid() has some know limitation - we shall replace it with e.g. \OC_Util::generateRandomBytes(13) But this is not the root of this issue. |
Not directly related but it reminds me of a time where our unit tests were using the current time() timestamp value and when the machine was too fast, the same timestamp would come out and cause trouble. Will |
@DeepDiver1975 did you find further useful information ? |
@DeepDiver1975 Is this still valid? |
@ogoffart still an issue? we changed the etag generation function in OC8+ - I'd assume this issue is solved by now. |
@jnfrmarks this should be testable somehow with smashbox (and a bit of timing luck) |
Hopefully solvable with high level file locking: #16237 |
Please reopen this if this still happens with high level file locking enabled. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Owncloud version: stable6 branch
As shown on this capture, two PUT request done in the same second lead to the same Etag.
(This bug make the client test fail from time to time)
The text was updated successfully, but these errors were encountered: