Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
I have a transform that caches the untransformed response, so that way I
perform the transformation for each subsequent cache hit of that document.
Whenever the response is peer fetched from another node in the cluster, the response headers are partially overwritten by the response data. This does not happen when the response is NOT cached, and it does NOT happen when NOT using cluster feature.
In my transform plugin I use TSIOBufferCreate to a create the buffer which
gets written into by TSIOBufferWrite with the desired response body.
When a response is peer fetched from cache, the address of the transformed
response header's values (I'm printing address using
TSHttpTxnTransformRespGet and other API's) starts halfway into the buffer
allocated by TSIOBufferCreate. So if I write about 2k into it, I
overwrite my response transform headers.
When the response is not from cache, or when the response is from cache
and we're not in a cluster, this does NOT happen, ever. Could be
coincidence, but its repeatable for response sizes varying from 5k to 10
MB.
I don't know how the Transform response headers values can share the same
memory as what I get from calling TSIOBufferCreate, but it does. My
concern is that at a deeper level the memory is being mismanaged, and
while I can check in my transform plugin if I'll overwrite my transform
resp header buffer, but what about other parts of ATS that are utilizing
buffers, or when I have multiple transforms happening at the same time?
Attachments
Issue Links
- blocks
-
TS-4026 Remove clustering feature in 7.0.0 release
- Closed