Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Make modified times more reliable #447

Open
gideonthomas opened this issue Oct 21, 2014 · 3 comments
Open

Make modified times more reliable #447

gideonthomas opened this issue Oct 21, 2014 · 3 comments
Assignees

Comments

@gideonthomas
Copy link
Contributor

In rsync, we use the node modified time in several places, sometimes even for comparisons. However, it is unreliable as different clients can be in different time zones. We need to make modified times more reliable.

One way to do this is by adding a wrapper to the fs that will lie in the middle of the current fs wrapper and the core fs. We can put a default time to use which will be UTC and allow the client to provide a time difference relative to UTC. Then, whenever we want to use modified time on the server, we use UTC, on the client we use the normal modified time (whatever fs core adds), while when we do comparisons, we convert the modified time to UTC by using what the client provides so that we can compare UTC with UTC times.

cc @humphd

@gideonthomas
Copy link
Contributor Author

also to consider: our code might break if the NOMTIME flag is set for the filesystem.

@humphd
Copy link
Contributor

humphd commented Oct 25, 2014

The problem is harder than this, I think, since you can't rely on the clocks in a client being accurate to each other. I can have my clock set fast, you slow, and we're toast. You'd need talk to a time server, and even then it's probably hard to get right.

Relying on times at all is problematic imho.

@alicoding
Copy link
Collaborator

I've extended this milestone till end of this week.

@gideonthomas gideonthomas removed this from the Per-File Syncing milestone Jan 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants