trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <zw...@apache.org>
Subject Re: git commit: TS-2415: use standard continuations to release UrlRewrite objects
Date Wed, 04 Dec 2013 15:37:51 GMT
On Dec 3, 2013, at 10:30 PM, jpeach@apache.org wrote:

> Updated Branches:
>  refs/heads/master 2b6a5f6bb -> 0f9305dc6
> 
> 
> TS-2415: use standard continuations to release UrlRewrite objects
> 
> UrlRewrite uses a custom continuation to release the old object
> after it is no longer needed. We can use library code for this
> instead. Use new_Deleter to free the old UrlRewrite object.
>   newTable = NEW(new UrlRewrite());
>   if (newTable->is_valid()) {
> -    eventProcessor.schedule_in(new UR_FreerContinuation(rewrite_table), URL_REWRITE_TIMEOUT,
ET_TASK);
> +    new_Deleter(rewrite_table, URL_REWRITE_TIMEOUT);
>     Debug("url_rewrite", "remap.config done reloading!");
>     ink_atomic_swap(&rewrite_table, newTable);
>   } else {
> 


Fwiw, this new_Deleter does not have the same semantics as the old code. The old code would
schedule the deletion on the ET_TASK thread pool, whereas new_Deleter runs on any of the net-threads.
This could mean that we’d block a net-thread for some time if the remap table is sufficiently
large.

I don’t know if it is a real, detrimental problem, but if I recall we moved the remap.config
reloading / management to ET_TASK because it did have a real problem when loading very large
configs.

Maybe the right thing is to make new_Deleter use ET_TASK? If there are no task threads configured,
that falls back to the old behavior?

— Leif


Mime
View raw message