alex2006hw / mogilefs

Automatically exported from code.google.com/p/mogilefs
0 stars 0 forks source link

Fix potential tempfile issue #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From the mailing list:

"
Just did a quick review; the *only* place in the code which fills out the
fromdevid field is "create_close", which gets the device id directly from
the client. Replication also hard fails if it can't pull the data from the
source field... So the files can't get replicated at all unless that
source exists and is usable at some point, or fsck is run and it does a
desperate search.

... and it should be adding the device tuple to the db. Do you run fsck
often? That could recover the files in this state.

The tempfile actually remembers what devids were suggested to the hosts,
but nothing presently verifies that one of those was used.

Think... I should close that hole. The client will hard error if it
receives a stored device id that doesn't match one listed in the tempfile.
Unless anyone thinks that's a bad idea? :P"

in short; create_open creates tempfile row, gives client options for where to 
store file.
client stores file somewhere.
client calls create_close with where it put the file, but the tracker never 
verifies that this fid is in the proper list.

leading to obscure client bugs if they mishandle the list from create_open.

Original issue reported on code.google.com by dorma...@rydia.net on 1 Oct 2010 at 2:37

GoogleCodeExporter commented 9 years ago
Fixed in git, will be in next release.

Original comment by dorma...@rydia.net on 4 Jan 2011 at 12:55