[Gluster-users] Atomic file updates
Jeff Darcy
jdarcy at redhat.com
Wed Feb 12 23:56:37 UTC 2014
> Are you saying that with these mount options I can just write files
> directly without using flock or renaming a temporary file, and that
> other processes trying to read the file will always see a complete and
> consistent view of the file?
For write-once files, the rename is really the key to ensuring that
readers never see an incomplete file. If you ever rewrite a file in
place, you'll need flock to avoid reading a partially updated (i.e.
inconsistent) file. Jay's suggestions might also be helpful even
though they both have to do with metadata, because we use attributes
to determine when it's necessary to re-read a file that might have
changed. It's kind of up to you to determine which combination is
needed to meet your own consistency goals with your own workload.
More information about the Gluster-users
mailing list