gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] Crawling and indexing hardware


From: Anand Avati
Subject: Re: [Gluster-devel] Crawling and indexing hardware
Date: Fri, 9 May 2008 18:38:43 +0530

> In theory - yes.
> In practice, there are some caveats. There are some nasty race conditions
> that make splitbrain even more dangerous than you might expect.
>
> Files are versioned. Deleting and re-creating a file causes the version to
> be reset. Some programs delete and re-create a file rather than modifying it
> (e.g. vi does). This has a number of dangerous side effects. If your
> disconnected server has an old version that was incrementally modified (e.g.
> log file being appended to), it's version will be high. If you delete and
> recreate the file, or do something that will have the same effect (e.g. edit
> with vi), the version on the working servers will be reset (low number).
>
> When the server that dropped out reconnects, it's version will be higher
> than the new (reset) version, and it's old file will clobber the new file.
>

This is not entirely correct. This can *potentially* happen if the two
clients (the client who created the first file and the client which
re-created the file) are out of sync in time. AFR keeps the client system
create time in the xattr and uses that as a major version number (the other
thread discusses changing this major number to be equal to the parent dir
minor number).

If time(system1) - time(system2) < wall_time(file1) - wall_time(file2) then
there is no data corruption.

avati


reply via email to

[Prev in Thread] Current Thread [Next in Thread]