madhuneal / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

COSS objects are "short" in the store after rebuild #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
COSS objects are returned as truncated after rebuild. This is a bug introduced 
with the store rebuild 
changes.

Original issue reported on code.google.com by adrian.c...@gmail.com on 25 Jul 2009 at 2:36

GoogleCodeExporter commented 9 years ago
The problem lies in the definition of "object size". I'll brain dump a little 
in here now and add some comments 
to clarify things with the commit.

The object size from objectLen() is the reply status, headers, and reply body.
The STORE_META_OBJSIZE is objectLen().
e->swap_file_sz is objectLen() + swap metadata.

The rebuild entry code was simply assembling swap_file_sz from re->file_size, 
rather than including the swap 
metadata header size as well. The AUFS rebuild code did the wrong thing and 
assigned re->file_size based on 
the stat() size; but the code ended up passing the "right" value into the proxy 
itself. COSS however set re-
>file_size to the value of STORE_META_OBJSIZE; this is obviously wrong!

The solution will come in a subsequent commit.

Original comment by adrian.c...@gmail.com on 25 Jul 2009 at 2:39

GoogleCodeExporter commented 9 years ago
This has been fixed in r12425.

Original comment by adrian.c...@gmail.com on 25 Jul 2009 at 7:04