GoogleCloudPlatform / gcsfuse

A user-space file system for interacting with Google Cloud Storage
https://cloud.google.com/storage/docs/gcs-fuse
Apache License 2.0
2.05k stars 426 forks source link

Why is object versioning not supported? #500

Closed apex-omontgomery closed 2 years ago

apex-omontgomery commented 3 years ago

Documents mention that object versioning is not supported.

gcsfuse does not support GCS buckets with object versioning enabled. (The default is to have this disabled.) No guarantees are made about its behavior when used with such a bucket.

Why is this the case and what would happen if a versioned GCS bucket was used in place of a non-versioned? I tried out using a versioned bucket and at a surface level I don't see any issues.

avidullu commented 2 years ago

Since GCSFuse works on the linux FUSE mechanism, it results in a lot of file overwrites and flushes which may create and/or mess up with the number of versions of each object which GCS maintains for a versioned bucket. Hence if using GCSFuse on a versioned bucket the results might surprise you when you do some editing of files etc. As an exercise, you could enable --foreground --debug_fs and --debug_fuse and observe the amount of file flushes, writes that happen on opening, closing and editing some files.

Hope this helps, please let us know if there is more that we can add.

avidullu commented 2 years ago

Closing since supporting versioned buckets is not feasible by design.

robbymilo commented 1 year ago

@wimo7083 I found that when deleting/restoring an object gcsfuse does not pick up the restored object. rclone mount (https://rclone.org/commands/rclone_mount/) does, however I'm not sure if there are any other downsides.