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

Upload time and Creation time #17765

Merged
merged 15 commits into from
Nov 18, 2019
Merged

Upload time and Creation time #17765

merged 15 commits into from
Nov 18, 2019

Conversation

icewind1991
Copy link
Member

This adds the logic to use the filecache_extended table, it allows storing and retrieving metadata_etag, creation_time and upload_time in the filecache, however metadata_etag is not exposed trough the public api for now and any logic for tracking it is left for future work.

  • Upload time is set automatically for every file uploaded over DAV
  • Creation time is not set automatically at the moment, but has to to be set by sync clients (either trough PROPFIND or as a header during upload)

We might want to add some automated logic for setting ctime in the future.

Now the filecache_extended table is getting used, we should think of any fields we might want to store in the future (even if they remain unused for a while) before we release 18

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Oct 31, 2019
@icewind1991 icewind1991 added this to the Nextcloud 18 milestone Oct 31, 2019
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!
Seems to work. Lets get this in now and discuss the rest separately. It already got big enough IMO.

@rullzer rullzer force-pushed the filecache-extension branch from 2fca816 to 4f85ec0 Compare November 7, 2019 08:11
@tobiasKaminsky
Copy link
Member

metadata_etag is not exposed trough the public api for now and any logic for tracking it is left for future work.

Can we schedule this also for 18, if possible? @rullzer
Client are waiting since ~13 for it…

@rullzer
Copy link
Member

rullzer commented Nov 11, 2019

@tobiasKaminsky sure we can expose it. But right now it doesn't do anything so there is no use.

It is an empty column. Just adding some value there doesn't help as it would need to duplicate the propagation logic as well because other wise you'd still need to check all files separately and then you can just do what you do now.

@tobiasKaminsky
Copy link
Member

Damn…I only read the first part with "exposing"…

this make the type hints work properly with querybuilder subclasses

Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
icewind1991 and others added 8 commits November 13, 2019 12:39
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer merged commit 5320f08 into master Nov 18, 2019
@rullzer rullzer deleted the filecache-extension branch November 18, 2019 14:29
@marinofaggiana
Copy link
Member

@icewind1991 @rullzer I have create a search dav as :

<?xml version="1.0"?>
<d:searchrequest xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"> 
<d:basicsearch>
...
<d:lte>
  <d:prop>
    <nc:upload_time />
  </d:prop>
  <d:literal>1591716364.299685</d:literal>
</d:lte>
...

but do not works (errro 400) ... It's a my error ?

@tobiasKaminsky
Copy link
Member

upload time needs to be a unix timestamp as far as I understand this, so e.g. 1591767801.
It is only seconds, nothing more.

@marinofaggiana
Copy link
Member

@tobiasKaminsky do not change, the error 400 continues ...

@marinofaggiana
Copy link
Member

@icewind1991 please, the new properties works with the searchrequest ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants