glyustb / mogilefs

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

MogileFS::Client->get_file_meta_from_key is broken #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Upload a file into mogilefs
2. Immediately call ->get_file_meta_from_key($dkey)
3. The returned length is expected to be the length of the file which was just 
uploaded.

The actual value is significantly smaller than what's expected, and as we check 
this after we put a file, this breaks things for us.

Original issue reported on code.google.com by bobtf...@bobtfish.net on 30 Aug 2011 at 2:24

GoogleCodeExporter commented 9 years ago
No such function? Are you referring to ->file_info() ?

Original comment by dorma...@rydia.net on 30 Aug 2011 at 3:54

GoogleCodeExporter commented 9 years ago
Duh, sorry - I'm being unhelpful and confusing, this is something in our local 
mogile client..

We say:

$self->{backend}->do_request('list_fids', { from => $fid, to => $fid });

and expect that to return a data structure containing the length of the file 
we've just written, however the length returned is incorrect.

Original comment by bobtf...@bobtfish.net on 30 Aug 2011 at 4:35

GoogleCodeExporter commented 9 years ago
Is the file_info command able to return accurate length data, by chance?

I'd just guess that there're missing quotes around 'length' inside 
cmd_list_fids - otherwise it's not clear at a glance what could be causing that 
since it's just pulling the rows.

Original comment by dorma...@rydia.net on 30 Aug 2011 at 5:03

GoogleCodeExporter commented 9 years ago
Ok, one thing that may be confusing this... Looks like I didn't log the change 
as well as I'd thought I did, but list_fids had its arguments "fixed" a few 
versions back.

list_fids would always break if you asked it to walk across a large gap (no way 
to tell when the next fid was, if you're iterating asking for the next 1000).

I ended up changing the function so from => fidid, and to => count

See also: moglistfids - say "start at this fid, fetch the next 5000" and it'll 
do that.

Probably should've added a new function and deprecated the old one, I apologize 
:/ Previously it was just broken as most clients would never walk a gap.

Original comment by dorma...@rydia.net on 3 Sep 2011 at 10:00

GoogleCodeExporter commented 9 years ago
ping?

Original comment by dorma...@rydia.net on 19 Sep 2011 at 3:13

GoogleCodeExporter commented 9 years ago
Sorry, I haven't had time to follow this up (pressures of work and a weeks 
holiday got in the way).

I promise I will be following up (and trying to get us upgraded to the latest 
code) during this week!

Original comment by bobtf...@bobtfish.net on 19 Sep 2011 at 9:11

GoogleCodeExporter commented 9 years ago
ping again :D

I want to do another release soon. It'd be good to finish folding your last few 
reports into it.

Original comment by dorma...@rydia.net on 27 Sep 2011 at 7:05

GoogleCodeExporter commented 9 years ago
I'm going to close this - I've thrown away our custom client patches, and I 
think I have a reasonable path to upgrading to calling ->file_info..

I'll report a new but (after doing some reasonable research this time) if any 
other issues come up.

Original comment by bobtf...@bobtfish.net on 29 Sep 2011 at 4:55