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

Remote mtime updates may be lost if inode has already been observed #114

Closed
jacobsa opened this issue Aug 13, 2015 · 1 comment
Closed

Comments

@jacobsa
Copy link
Contributor

jacobsa commented Aug 13, 2015

As documented in this commit, we don't observe mtime updates made remotely when an inode has already been assigned locally. This is a bit weird, and maybe annoying if you're using gcsfuse as an rsync destination on one system and source on another.

This is because from our point of view GCS objects are only "mostly" immutable—a given generation's data can't change, but it's metadata (which includes gcsfuse_mtime), can. But GCS offers metadata generation numbers for exactly this purpose.

So:

  • Update semantics.md to specify that identity is on both generation and metadata generation. So even updates to metadata may cause a file to appear unlinked.
  • Add integration tests for the identity logic. Look to existing 'clobbered' tests for inspiration.
  • Add an integration test for setting mtime metadata for a file we've already observed.
  • Update FileInode and friends so that their SourceGeneration methods return both a generation and a metadata generation.
  • Pay attention to both in fileSystem lookup code.
  • Remove the note from semantics.md.

After this we'll observe remote mtime updates after the stat cache ttl expires.

@jacobsa
Copy link
Contributor Author

jacobsa commented Aug 13, 2015

Also:

  • Wherever a generation number is used to address an object or as a precondition, we want to also use metadata generation.

jacobsa added a commit that referenced this issue Aug 13, 2015
jacobsa added a commit that referenced this issue Aug 13, 2015
This pulls in a bunch of precondition functionality we need for #114.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant