Traffic Server
  1. Traffic Server
  2. TS-1209

background_fill values don't seem to be working

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.1.4
    • Component/s: Cache
    • Labels:
      None

      Description

      If I request a 57 MB file TS caches the fill no problem and on subsequent requests the file gets served from cache. If I cut the request early, about 40MB downloaded and I have proxy.config.http.background_fill_completed_threshold = 0.5 and proxy.config.http.background_fill_active_timeout is suitably high, the file is not cached. I am of the understanding that the background fill values should keep the OS connection open and allow the full item to be cached though this is not happening.

      I have tried various values for proxy.config.http.background_fill_completed_threshold ranging from 0.0 -> 0.5, none seem to work.

      1. TS-1209.patch
        0.7 kB
        Robert Logue

        Activity

        Robert Logue created issue -
        Hide
        Robert Logue added a comment -

        ok so there is a function HttpSM::is_bg_fill_necessary that lets TS know if it should do a background fill. In here it checks 3 items, initially, 2 of which are ok but one fails. The check that fails is c->producer->vc_type == HT_HTTP_SERVER, in my scenario c->producer->vc_type == HT_TRANSFORM. Also I have a transform plugin running. If I remove the transformation plugin the background fill works fine.

        Show
        Robert Logue added a comment - ok so there is a function HttpSM::is_bg_fill_necessary that lets TS know if it should do a background fill. In here it checks 3 items, initially, 2 of which are ok but one fails. The check that fails is c->producer->vc_type == HT_HTTP_SERVER, in my scenario c->producer->vc_type == HT_TRANSFORM. Also I have a transform plugin running. If I remove the transformation plugin the background fill works fine.
        Leif Hedstrom made changes -
        Field Original Value New Value
        Fix Version/s 3.1.4 [ 12318543 ]
        Hide
        Leif Hedstrom added a comment -

        Did you try if allowing for HT_TRANSFORM works? If so, seems like an easy fix.

        Also, why do you still need the transformation plugin? Not saying we shouldn't fix this, but curious as to why you still need it.

        Show
        Leif Hedstrom added a comment - Did you try if allowing for HT_TRANSFORM works? If so, seems like an easy fix. Also, why do you still need the transformation plugin? Not saying we shouldn't fix this, but curious as to why you still need it.
        Hide
        Robert Logue added a comment -

        Yes tried that and it works, I just wasn't sure about any implications of allowing that as I have only started working with TS for the last few weeks.

        As to why I need it, there are certain situations where my plugin must see the total file and I was using background_fill to allow that.

        Show
        Robert Logue added a comment - Yes tried that and it works, I just wasn't sure about any implications of allowing that as I have only started working with TS for the last few weeks. As to why I need it, there are certain situations where my plugin must see the total file and I was using background_fill to allow that.
        Hide
        Leif Hedstrom added a comment -

        Submit a patch on the bug

        Show
        Leif Hedstrom added a comment - Submit a patch on the bug
        Hide
        Robert Logue added a comment -

        If you point me in the direction of the documentation of the submission process I will gladly submit a patch, I was looking about for a while and couldn't find what I was looking for

        Show
        Robert Logue added a comment - If you point me in the direction of the documentation of the submission process I will gladly submit a patch, I was looking about for a while and couldn't find what I was looking for
        Robert Logue made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Robert Logue added a comment -

        Affected file : trafficserver-3.0.4/proxy/http/HttpSM.cc.

        The issue here was that the HttpSM::is_bg_fill_necessary method checks that the connection type on the producer is HT_HTTP_SERVER I have added an OR for this so the connection can now be HT_HTTP_SERVER or HT_TRANSFORM.

        Show
        Robert Logue added a comment - Affected file : trafficserver-3.0.4/proxy/http/HttpSM.cc. The issue here was that the HttpSM::is_bg_fill_necessary method checks that the connection type on the producer is HT_HTTP_SERVER I have added an OR for this so the connection can now be HT_HTTP_SERVER or HT_TRANSFORM.
        Robert Logue made changes -
        Attachment TS-1209.patch [ 12524163 ]
        Hide
        Robert Logue added a comment -

        I have attached a patch file. I am not sure what else to do with this ticket.

        Show
        Robert Logue added a comment - I have attached a patch file. I am not sure what else to do with this ticket.
        Leif Hedstrom made changes -
        Assignee Leif Hedstrom [ zwoop ]
        Hide
        Leif Hedstrom added a comment -

        commit 04311e0c6e9b256ea8129b5a3cd5ccfbd786c381
        Author: Robert Logue <rplogue@hotmail.co.uk>
        Commit: Leif Hedstrom <zwoop@apache.org>

        TS-1209 Allow for background fill when producer is a transform.

        Author: Robert Logue.

        Show
        Leif Hedstrom added a comment - commit 04311e0c6e9b256ea8129b5a3cd5ccfbd786c381 Author: Robert Logue <rplogue@hotmail.co.uk> Commit: Leif Hedstrom <zwoop@apache.org> TS-1209 Allow for background fill when producer is a transform. Author: Robert Logue.
        Leif Hedstrom made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Leif Hedstrom made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Leif Hedstrom
            Reporter:
            Robert Logue
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development