• Nils Goroll's avatar
    fix probe not started for already warm vcl · d912ffe4
    Nils Goroll authored
    For (real) backends, we used to assign the probe after adding the
    director via VRT_AddDirector(). For an already warm vcl, this lead to
    a VCL_WARM event missed because the event was issued by
    VRT_AddDirector() when the probe did not exist yet.
    
    We fix this by preparing all of the backend before adding the
    director, undoing the work for a failure doing do.
    
    In addition, if adding a backend while the vcl is cold, we need to set
    the initial director state based on the probe configuration after
    adding the director.
    
    We avoid the overhead of the vcl temperature lock because no harm is
    done: If, after the director was added, the temperature goes cold, we
    just run an additional update, and if it goes warm, the update will
    already have happened.
    
    Likely related to https://github.com/nigoroll/libvmod-dynamic/issues/35
    d912ffe4
cache_backend.c 16.4 KB