[Gluster-users] Atomic file updates
Jeff Darcy
jdarcy at redhat.com
Thu Feb 13 11:52:01 UTC 2014
> It's not the time overhead of creating a link file that I'm worried
> about - it's making sure that I don't end up with millions of orphaned
> link files, or link files pointing at other link files.
That shouldn't be a problem, because we manage the link files across
renames, deletes, rebalancing, etc. If an operation causes a linkfile
to become invalid or unnecessary we take care of that ourselves before
we consider the original operation complete.
> The main difference from what I'm doing now
> seems to be that the first part of the temporary file needs to be
> identical to the final file instead having a unique random name.
The temporary file name needs to be some kind of extension of the
final file name, so that we have that final file name in our hands to
generate the correct hash value (which we then use to place the file).
However, the final file name doesn't have to be at the beginning. It
can just as easily be at the end or even in the middle. The prefix
and/or suffix used to create the temporary file can be either fixed
or random, so long as there's some rule expressible as a regex that
can be used to separate the permanent part from the temporary ones.
More information about the Gluster-users
mailing list