Closed paulproteus closed 8 years ago
Moving here from https://github.com/sandstorm-io/sandstorm/issues/1205
Funny enough, the first search result for "x-oc-mtime" is now this github issue. In digging around in the owncloud source, it seems that x-oc-mtime
is actually just a piece of metadata the server is expected to hold onto.
Unfortunately right now Davros' storage is just the filesystem, so I'm not sure there's an easy way to keep these around. At some point in the mid-term future I'd like to revamp the storage layer to add things like metadata and versioning, and at that point it would be a lot easier to support this.
FWIW, since Davros uses the filesystem, and the x-oc-mtime seems to mirror the filesystem's concept of "modified time" aka "mtime", it seems to me that Davros can use https://nodejs.org/api/fs.html#fs_fs_futimes_fd_atime_mtime_callback fs.futimes() to change the mtime.
Other reference:
I have a partially working implementation of this, but it turns out that X-OC-MTime
needs both a request and response header in order to work. (client sends X-OC-MTime: 123456789
, server sends X-OC-MTime: accepted
) So I think the best bet is to wait on https://github.com/sandstorm-io/sandstorm/pull/1202 to be merged.
Just wanted to add I saw this error today too in this constellation:
Installed owncloud client on my MACbook, copied a folder with some 20 files or so into it, then installed the client on Windows 10 and about 6 files or so were giving this error and had not been synced to the Win10 machine. I then quit/restarted the client on the MAC and the files were synced to my sandstorm instance. Once I quit and restarted the Win10 client the changes were synced there too.No more X-OC-Time errors.
No idea what went on here but there you go.
So if davros gives me this mtime error, that does mean those files have not been synced, right?
Unfortunately it looks like we're still stuck on https://github.com/sandstorm-io/sandstorm/pull/1202, but I don't believe the x-oc-mtime warning should hurt anything. It may just involve an extra request as the client verifies its version matches the server's.
I had believed that this was just a warning, but it appears that there may be some mysterious off-by-one error in the Owncloud client which causes crashes relating to this header. smashbox
(the owncloud acceptance test suite) fails hard when no X-OC-MTime: accepted
header is sent, but works when it is.
It's doubly unfortunate since mtime
is a totally unreliable thing to sync across machines due to clock differences, etc.
This is now fixed.
While using
owncloudcmd
to sync files to a Davros grain, I get a message in myowncloudcmd
log that says:Server do not support X-OC-MTime ""
I suspect it would be wise for us to add support to this to Sandstorm. Presumably my client is going to submit duplicated requests to Davros based on not having access to remote mtimes, so I thought I should file this.
Slightly longer log snippet: