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

Test file locking #134

Merged
merged 3 commits into from
Mar 22, 2016
Merged

Test file locking #134

merged 3 commits into from
Mar 22, 2016

Conversation

nickvergessen
Copy link

Test description

Step User
2 Enable QA testing app
3 Create dir/subdir/
4 Populate locks
5 Try to upload dir/subdir/file2.dat
6 Remove locks
7 Upload dir/subdir/file2.dat

Cases

Case Description Result Test
0 Exclusive lock on dir/ Can not upload ❌ - File upload fails in 7 as well
1 Shared lock on dir/ Can upload
2 Exclusive lock on dir/subdir/ Can not upload ❌ - File upload fails in 7 as well
3 Shared lock on dir/subdir/ Can upload
4 Exclusive lock on dir/ + Shared lock on dir/subdir/ Can not upload ❌ - File upload fails in 7 as well
5 Shared lock on dir/ + Exclusive lock on dir/subdir/ Can not upload ❌ - File upload fails in 7 as well
6 Shared lock on dir/ and dir/subdir/ Can upload

@nickvergessen nickvergessen force-pushed the locking-with-provisioning branch from fa6668c to d644b03 Compare March 3, 2016 15:19
@nickvergessen
Copy link
Author

Okay, I seem to have found out the issue.
When we sync the folders in step 3, they don't have a md5 (etag)set, also the folders have RDNVW as permission.
when we now do a second sync, the permissions are set correctly to RDNVCK.
But when we already moved a file into the folder, the file will fail because C is not in the permissions.

Not sure if "adding a second sync" is the way to go, or if the client should update the etag and permissions on the first sync?

@nickvergessen nickvergessen changed the title Test lockingx Test file locking Mar 3, 2016
@guruz
Copy link

guruz commented Mar 3, 2016

When we sync the folders in step 3, they don't have a md5 (etag)set,

That's normal and intended, the next sync would update them via PROPFIND.

also the folders have RDNVW as permission.

That permission string is created by who? The server? Because I don't see it retrieved in PropagateRemoteMkdir and I don't find in the client where that could be created

FYI @ogoffart @ckamm

@nickvergessen
Copy link
Author

also the folders have RDNVW as permission.

That permission string is created by who? The server?

I don't think so, because a propget always says permissions RDNVCK for me. So I assume that is client discovery.

@nickvergessen
Copy link
Author

Here are the full sync logs of a try:
https://gist.github.com/nickvergessen/8f5b8ea746a32a7a934b

@nickvergessen
Copy link
Author

Okay, so I changed the test to work with folders only, instead of files. Tests still failed, then I removed the skeleton files, to make sure, that the test always only ever deals with files, and see there: test passes.

So it seems that some variable is not reset correctly, after dealing with a file before reusing it for a folder. (All cheers to @guruz for that hint)

@nickvergessen
Copy link
Author

I can't seem to find the root cause of this. I can only confirm that two things fix the issue:

  1. Don't block the first sync of the file
  2. Don't sync a files but folders only

I hope that helps the desktop guy stepping in here.

@ckamm
Copy link

ckamm commented Mar 15, 2016

@nickvergessen A potential fix was merged to master 7bd4f95b8c200e0fc2d5eff2bc5ab2428356a2ba, see owncloud/client#4548

@nickvergessen
Copy link
Author

Yes, confirmed that it works with that commit. Nice find!

@nickvergessen nickvergessen force-pushed the locking-with-provisioning branch from baf867f to a11606a Compare March 15, 2016 15:04
@nickvergessen nickvergessen removed the WIP label Mar 15, 2016
@nickvergessen
Copy link
Author

The test is written in a way, that it will not fail on 9.0 and when using another locking then DB, so it should be good to merge @PVince81

@PVince81
Copy link

👍

nickvergessen added a commit that referenced this pull request Mar 22, 2016
@nickvergessen nickvergessen merged commit 33f7488 into master Mar 22, 2016
@nickvergessen nickvergessen deleted the locking-with-provisioning branch March 22, 2016 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants