[Box Backup-dev] COMMIT r235 - box/chris/boxi/bin/bbstored
Chris Wilson
boxbackup-dev@fluffy.co.uk
Thu, 15 Dec 2005 13:07:59 +0000 (GMT)
Hi Ben,
Thanks for looking at this patch.
> I don't this is quite right.
It probably isn't, after all I wrote it :-)
> The name of error is wrong. Why would the client care about RaidFiles
> anyway? Surely the error should be "directory doesn't exist".
>
> What problem are you attempting to solve here?
When the store is corrupt on the server (e.g. missing raidfile directory),
bbstored will die when trying to read it, which gives the client a
TLSReadFailed. I couldn't think of a less helpful error to send to the
client, so I tried to improve it.
I wanted the client to be able to phone/email the server operator and say
something more useful than "it doesn't work" or "the server disconnected
me". Perhaps they shouldn't care about RAID files, but the error should at
least indicate that the store is corrupt and the server admin should run
bbstoreaccounts check on it.
> In which case, checking for a RaidFile exception isn't quite right, because
> you're missing the case where the object ID refers to a file.
Sorry, what case? Surely that's the client's business. It always asks the
server for an object ID.
> Also, brace placement is against style guide.
Sorry, which one, the try/catch?
>> + try {
[...]
>> + } catch (RaidFileException &e) {
Cheers, Chris.
--
_ ___ __ _
/ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |