-
Notifications
You must be signed in to change notification settings - Fork 112
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
Disable chunking v1 by default #678
Conversation
@labkode I heard there might not be interest in keeping and maintaining the old chunking v1. If that's the case maybe we could just remove all the related code instead ? |
Hi @PVince81 nice to see you hacking again. OCIS needs to come with production support for the existing sync algorithms. So for now we can promote V2 as default sync algo but definetely not retiring the V1 code yet. @butonic any ideas of how to push the chunks from the V2 and finish the upload on the storage? |
@@ -120,6 +121,15 @@ func (s *svc) handlePut(w http.ResponseWriter, r *http.Request, ns string) { | |||
} | |||
|
|||
if ok { | |||
// TODO: disable if chunking capability is turned off in config |
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.
just remove the code
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.
assuming you meant remove all the commented out code and don't add a check ? (not remove the chunking code)
I got a bit confused with the versions.
As far as I understood, according to owncloud/ocis#195 the chunking v1 in OCIS has troubles with the final PUT. So this is the one we should disable. Also is it correct that chunking v2 is not implemented yet / not ready ? If yes, then this PR is still valid to disable v2 chunking for production until it is stable (or remapped to TUS). |
@labkode based on our experience with implementing tus in phoenix we would prefer to implement tus in the clients instead of supporting chunking v1 / v2 in ocdav. |
@butonic supporting TUS alone and forget about the existing chunk algorithms makes sense when all the clients will support it, and we need to go for production with OCIS in short term. |
Sounds like a challenge… Careful estimation:
|
Thanks @michaelstingl, how would you support a smooth transition from the current algorithm to the new one? Will the clients support both protocols for some time and they will use the one or another based on the capabilities offered by the server? |
Yeah, strictly based on capabilities. iOS clients have no chunking at all, and Android has incomplete implementation. I could imagine this:
*: If no capability is set, Desktop Sync client assumes Chunking V1 works. This need to be fixed. |
@labkode @butonic Chunking V1 and Chunking NG both are broken in oCIS. Please approve the PR do set capabilities accordingly. This can be changed later, if decision changes again, and Chunking V1 and Chunking NG gets fixed, capabilities can be added again. This blocks development and testing of clients!! /cc @felixboehm @micbar |
yes, please merge to unblock. |
note: we don't need this PR to disable capabilities, this was already done in owncloud/ocis-reva#145 not sure if this PR here is still needed for that purpose |
@michaelstingl @felixboehm let me know what is blocking you, capabilities are configurable, if you don't want to expose one protocol is very easy to do so in the config of the OCS service. |
This PR only changes the default value for the chunking algorithm, from v1 to nothing. If you have a better default, of course, we can change it. However, I don't think this PR has been blocking you from testing the clients, as @PVince81 pointed out is a matter of changing the configuration to enable one protocol or another. |
I've just tested and it seems that owncloud/ocis-reva#145 is not enough. When sitting on this PR here the chunking is properly disabled. Before this PR:
After this PR:
I'll adjust the PR to be minimal |
I've adjusted the PR, so now it defaults to disabled. I'm not sure how the higher level config stuff is working, but apparently in our current deployment it seems to be using the default provided by reva. In any case, since it's not working properly it is safer to disable it by default. |
This is because chunking v1 is not working correctly currently with desktop clients, so we better not advertise the capability until it's stable. That is, if there is interest at all to make it stable considering that we're moving to TUS: #661
In this PR I've set the default config to not set version 1 for the chunking capabilitiy.
Now:
@butonic