trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan M. Carroll" <...@network-geographics.com>
Subject Re: Issue with VConn close
Date Wed, 13 Mar 2013 03:32:06 GMT
I don't see where in the code the cacheHandler is called. I would also note that you are calling
handle_transform for every chunk of data that passes through the null transform - hopefully
you realize those chunks are not consistent in size, and non-reliably repeatable between runs.

The event system uses a lot of chaining, where events are passed from VC to VC in the flow
chain. When the cache writer is closed, the event is passed on to the transform VC. Sometimes
this is done via scheduling but it can also happen through direct calls so that it appears
as if the null transform event handler is called from the cache writer VC, which although
technically true is done through event system intermediaries.

Tuesday, March 12, 2013, 7:36:57 AM, you wrote:

> Hi All,


> I am trying to implement cache write using plugin cache.


> After the null transfrom has made a cont call for event TS_EVENT_VCONN_WRITE_COMPLETE,
I try to
> do cache write.
> In order to handle these cases I create a queue of cache data. I check if the
> queue has data in a infinite running thread(threadcacheWrite), created using TSThreadCreate.
If It has, I create a cont for cache write
> and perform cache write(TSCacheWrite).
> After the cache write is complete I close the VConn.
> However the the closed vconn instead of calling the same function(cacheHandler), it calls
null_transform function.
> This function is again called when the null_transform vconn is also closed.
> Also the data passed to null_transform function is same in both the cases.


> Can anybody suggest me why the cache vconn is going to null transform handler.
> I checked this by using function (TSVConnClosedGet) and printing cont data.
> The cont data printed is same in both the cases.
> Due to this I am unable to free the Cont and it is resulting in memory leaks.


> I have also attached sample code in two files for the reference.


> Am I missing something


> Regards


Mime
View raw message