• Nils Goroll's avatar
    Workaround for Varnish-Cache VC#4013: Wrong trim use, inefficient copy · 8409356f
    Nils Goroll authored
    https://github.com/varnishcache/varnish-cache/pull/4013 fixes two
    issues in Varnish-Cache, which are relevant for SLASH/fellow and of
    which the first is the root cause of #33.
    
    This commit works around these issues until the fix gets merged:
    
    Because of the wrong use of the .objtrimstore API function by
    varnish-cache, we remove it from our obj_methods and exploit the fact
    that varnish-cache always sets the OA_LEN attribute when the object is
    complete: We move the trimstore function there, effectively calling it
    at the right time only.
    
    The inefficient memory allocation fixed in the second commit of
    VC#4013 is particularly relevant for fellow, because it causes the
    allocation code to assume that the object might grow up to the maximum
    possible size, which causes a substantial over-allocation. We work
    around this issue for the case that a 304 copy is made from fellow to
    fellow by using private thread-local storage to emulate basically the
    same function as the #4013 fix.
    
    Closes #33
    Ref https://github.com/varnishcache/varnish-cache/pull/4013
    8409356f
Name
Last commit
Last update
LICENSES Loading commit data...
logs Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
BUGS.rst Loading commit data...
CHANGES.rst Loading commit data...
COPYING Loading commit data...
INSTALL.rst Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
bootstrap Loading commit data...
configure.ac Loading commit data...