You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Leif Hedstrom <zw...@apache.org> on 2018/05/15 16:29:02 UTC

[PROPOSAL] Adding another callback to remap plugins

Hi all,

I can’t remember now if I brought this up here earlier, but I have a PR / proposal to add one more callback to the remap plugin APIs:

	.. function:: void TSRemapConfigReload(void)


The purpose of this callback is that it gets called once (for each remap plugin) upon remap.config reload. The typical use case that would be that you can reset some internal state in how you parse all the rules in remap.config. As an example, I have a few plugins that keeps a “configuration cache” during reload (because loading the config is very slow, yet repeats often), and without this new callback, it’s not possible to know in a plugin when remap.config is reloaded.

Note: This only gets called during remap.config reload, not during the first load time. This is intentional, because there’s already a callback that happens when the plugin is first loaded, TSRemapInit().

The PR is on

	https://github.com/apache/trafficserver/pull/3559 <https://github.com/apache/trafficserver/pull/3559>


Thanks,

— leif


Re: [PROPOSAL] Adding another callback to remap plugins

Posted by Chris Lemmons <al...@gmail.com>.
+1

On Wed, May 16, 2018 at 10:37 AM, Gancho Tenev <gt...@apple.com> wrote:
> +1
>
>
>> On May 16, 2018, at 6:50 AM, Steven R. Feltner <sf...@godaddy.com> wrote:
>>
>> +1
>>
>> On 5/16/18, 9:45 AM, "Alan Carroll" <so...@oath.com.INVALID> wrote:
>>
>>    +1
>>
>>    On Tue, May 15, 2018 at 2:27 PM, Otto van der Schaaf <os...@gmail.com>
>>    wrote:
>>
>>> +1
>>>
>>> On Tue, May 15, 2018 at 6:29 PM Leif Hedstrom <zw...@apache.org> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I can’t remember now if I brought this up here earlier, but I have a PR /
>>>> proposal to add one more callback to the remap plugin APIs:
>>>>
>>>>        .. function:: void TSRemapConfigReload(void)
>>>>
>>>>
>>>> The purpose of this callback is that it gets called once (for each remap
>>>> plugin) upon remap.config reload. The typical use case that would be that
>>>> you can reset some internal state in how you parse all the rules in
>>>> remap.config. As an example, I have a few plugins that keeps a
>>>> “configuration cache” during reload (because loading the config is very
>>>> slow, yet repeats often), and without this new callback, it’s not
>>> possible
>>>> to know in a plugin when remap.config is reloaded.
>>>>
>>>> Note: This only gets called during remap.config reload, not during the
>>>> first load time. This is intentional, because there’s already a callback
>>>> that happens when the plugin is first loaded, TSRemapInit().
>>>>
>>>> The PR is on
>>>>
>>>>        https://github.com/apache/trafficserver/pull/3559 <
>>>> https://github.com/apache/trafficserver/pull/3559>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> — leif
>>>>
>>>>
>>>
>>
>>
>

Re: [PROPOSAL] Adding another callback to remap plugins

Posted by Gancho Tenev <gt...@apple.com>.
+1


> On May 16, 2018, at 6:50 AM, Steven R. Feltner <sf...@godaddy.com> wrote:
> 
> +1
> 
> On 5/16/18, 9:45 AM, "Alan Carroll" <so...@oath.com.INVALID> wrote:
> 
>    +1
> 
>    On Tue, May 15, 2018 at 2:27 PM, Otto van der Schaaf <os...@gmail.com>
>    wrote:
> 
>> +1
>> 
>> On Tue, May 15, 2018 at 6:29 PM Leif Hedstrom <zw...@apache.org> wrote:
>> 
>>> Hi all,
>>> 
>>> I can’t remember now if I brought this up here earlier, but I have a PR /
>>> proposal to add one more callback to the remap plugin APIs:
>>> 
>>>        .. function:: void TSRemapConfigReload(void)
>>> 
>>> 
>>> The purpose of this callback is that it gets called once (for each remap
>>> plugin) upon remap.config reload. The typical use case that would be that
>>> you can reset some internal state in how you parse all the rules in
>>> remap.config. As an example, I have a few plugins that keeps a
>>> “configuration cache” during reload (because loading the config is very
>>> slow, yet repeats often), and without this new callback, it’s not
>> possible
>>> to know in a plugin when remap.config is reloaded.
>>> 
>>> Note: This only gets called during remap.config reload, not during the
>>> first load time. This is intentional, because there’s already a callback
>>> that happens when the plugin is first loaded, TSRemapInit().
>>> 
>>> The PR is on
>>> 
>>>        https://github.com/apache/trafficserver/pull/3559 <
>>> https://github.com/apache/trafficserver/pull/3559>
>>> 
>>> 
>>> Thanks,
>>> 
>>> — leif
>>> 
>>> 
>> 
> 
> 


Re: [PROPOSAL] Adding another callback to remap plugins

Posted by "Steven R. Feltner" <sf...@godaddy.com>.
+1

On 5/16/18, 9:45 AM, "Alan Carroll" <so...@oath.com.INVALID> wrote:

    +1
    
    On Tue, May 15, 2018 at 2:27 PM, Otto van der Schaaf <os...@gmail.com>
    wrote:
    
    > +1
    >
    > On Tue, May 15, 2018 at 6:29 PM Leif Hedstrom <zw...@apache.org> wrote:
    >
    > > Hi all,
    > >
    > > I can’t remember now if I brought this up here earlier, but I have a PR /
    > > proposal to add one more callback to the remap plugin APIs:
    > >
    > >         .. function:: void TSRemapConfigReload(void)
    > >
    > >
    > > The purpose of this callback is that it gets called once (for each remap
    > > plugin) upon remap.config reload. The typical use case that would be that
    > > you can reset some internal state in how you parse all the rules in
    > > remap.config. As an example, I have a few plugins that keeps a
    > > “configuration cache” during reload (because loading the config is very
    > > slow, yet repeats often), and without this new callback, it’s not
    > possible
    > > to know in a plugin when remap.config is reloaded.
    > >
    > > Note: This only gets called during remap.config reload, not during the
    > > first load time. This is intentional, because there’s already a callback
    > > that happens when the plugin is first loaded, TSRemapInit().
    > >
    > > The PR is on
    > >
    > >         https://github.com/apache/trafficserver/pull/3559 <
    > > https://github.com/apache/trafficserver/pull/3559>
    > >
    > >
    > > Thanks,
    > >
    > > — leif
    > >
    > >
    >
    


Re: [PROPOSAL] Adding another callback to remap plugins

Posted by Alan Carroll <so...@oath.com.INVALID>.
+1

On Tue, May 15, 2018 at 2:27 PM, Otto van der Schaaf <os...@gmail.com>
wrote:

> +1
>
> On Tue, May 15, 2018 at 6:29 PM Leif Hedstrom <zw...@apache.org> wrote:
>
> > Hi all,
> >
> > I can’t remember now if I brought this up here earlier, but I have a PR /
> > proposal to add one more callback to the remap plugin APIs:
> >
> >         .. function:: void TSRemapConfigReload(void)
> >
> >
> > The purpose of this callback is that it gets called once (for each remap
> > plugin) upon remap.config reload. The typical use case that would be that
> > you can reset some internal state in how you parse all the rules in
> > remap.config. As an example, I have a few plugins that keeps a
> > “configuration cache” during reload (because loading the config is very
> > slow, yet repeats often), and without this new callback, it’s not
> possible
> > to know in a plugin when remap.config is reloaded.
> >
> > Note: This only gets called during remap.config reload, not during the
> > first load time. This is intentional, because there’s already a callback
> > that happens when the plugin is first loaded, TSRemapInit().
> >
> > The PR is on
> >
> >         https://github.com/apache/trafficserver/pull/3559 <
> > https://github.com/apache/trafficserver/pull/3559>
> >
> >
> > Thanks,
> >
> > — leif
> >
> >
>

Re: [PROPOSAL] Adding another callback to remap plugins

Posted by Otto van der Schaaf <os...@gmail.com>.
+1

On Tue, May 15, 2018 at 6:29 PM Leif Hedstrom <zw...@apache.org> wrote:

> Hi all,
>
> I can’t remember now if I brought this up here earlier, but I have a PR /
> proposal to add one more callback to the remap plugin APIs:
>
>         .. function:: void TSRemapConfigReload(void)
>
>
> The purpose of this callback is that it gets called once (for each remap
> plugin) upon remap.config reload. The typical use case that would be that
> you can reset some internal state in how you parse all the rules in
> remap.config. As an example, I have a few plugins that keeps a
> “configuration cache” during reload (because loading the config is very
> slow, yet repeats often), and without this new callback, it’s not possible
> to know in a plugin when remap.config is reloaded.
>
> Note: This only gets called during remap.config reload, not during the
> first load time. This is intentional, because there’s already a callback
> that happens when the plugin is first loaded, TSRemapInit().
>
> The PR is on
>
>         https://github.com/apache/trafficserver/pull/3559 <
> https://github.com/apache/trafficserver/pull/3559>
>
>
> Thanks,
>
> — leif
>
>