PATCH: mogilefsd get_file_size

Justin Azoff JAzoff at
Sun May 8 19:07:38 PDT 2005

so I've been testing my python client by having the mogstored processes
on each node restart every 40 seconds while repeatedly uploading and
downloading files.

Every now and then it would die with a filesize mismatch.  I read the
code for it and noticed that it wanted to use 7501, which I didn't have
open.  Opening that made it much worse.  What was happening was on
localhost, 7501 worked, so it used 'size'. On other nodes it had to fall
back to 'HEAD'  Once I opened 7501 and it used 'size' for everything it
bailed out much more often.

The reason this was happening is that mogilefsd caches the socket.
Since I've been restarting mogstored, the sockets become invalid, but
the short 'size ...' request must not be enough to trigger an error, so
it was returning 0.

The patch makes a distinction between 0 and undef, and forces a retry if
the first attempt comes back as undefined.

Testing this involves uploading a file to a node to get the socket
cached, restarting the node, then trying to upload another file.

-- Justin Azoff
-- Network Performance Analyst
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mogilefsd.patch
Type: text/x-patch
Size: 1667 bytes
Desc: not available
Url :

More information about the mogilefs mailing list