-
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
locking for chunked dav upload #17104
Conversation
Dangerous change that late in the release, it does not only affect locking. It seems you aren't firing any hooks ? I'd rather have this in 8.2. Locking already works with chunking, it just doesn't wrap everything in a bigger transaction yet. This could be done in 8.2 instead. |
|
|
With and without this change the whole assembly process (which is the one which eats time) is locked - so I guess this is not a critical/required change. @icewind1991 do I miss anything? What we need is a locking mechanism for the whole chunked upload procedure? |
Without this change the assembly itself is locked but only on the part file path and the other related operations (cache updates, touch, etc) are not locked. |
understood - what is the risk? |
@icewind1991 Ping |
I don't think the risk is high, in most cases the only risk is between assembling the file in a .part and renaming it to the final target |
When I asked about risk, I was talking about risk of regression. |
The following things need to be tested:
|
Also missing:
Last week I already added tests for the non-chunking case, hopefully these can be reused. |
@PVince81 sure - but my question was explicit on the risk of NOT having this change in. As the risk is not that high I tend to move this to 8.2. @PVince81 agree? THX |
Yes, let's make this 8.2. |
8.2 is fine by me |
@icewind1991 please rebase and add unit tests. |
Please make sure folder size propagation still works, see #18006 |
@icewind1991 did you try reproducing the issue ? |
dc5b825
to
faa59c0
Compare
A new inspection was created. |
Had a quick test with the sync client to verify that chunk uploads are still creating versions. This confirms that hooks are fired properly. 👍 |
(not too happy to have such huge change that late, but fine) |
You are right - there is no real need for this (as in fixes sev1 or sev2) 8.2.1 or 9.0 ? |
I would say 9.0, because backporting such stuff in a point release is really tricky and can go horribly wrong. Having this in early 9.0 will be much better. |
cc @karlitschek @cmonteroluque |
OK, moving to 9.0 |
yes. too risky |
Needs a second reviewer @nickvergessen @DeepDiver1975 |
ebcdccf
to
283798a
Compare
@@ -43,6 +45,34 @@ public function testUploadOverWrite() { | |||
$this->assertEquals(3, $info->getSize()); | |||
} | |||
|
|||
/** | |||
* @expectedException \OC\Connector\Sabre\Exception\FileLocked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this needs to be adjusted to the new location inside apps/dav
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@MorrisJobke @DeepDiver1975 can this be merged? |
Letting Smashbox run against this? ;) |
Smashed: ✅ |
@DeepDiver1975 @MorrisJobke merge? |
I also did some tests with cadaver as 3rdparty client. Everything still works 👍 |
locking for chunked dav upload
Change the locking handler code to work directly on the storage and lock the upload target while we're assembling the chunks.
cc @DeepDiver1975 @PVince81