JakeChampion opened a new pull request, #13637:
URL: https://github.com/apache/trafficserver/pull/13637

   `unmarshal_helper` picks `HTTPInfo::unmarshal_v24_1` for objects older than 
`CACHE_DB_VERSION`, but the real boundary is `24.2`, where `HTTPInfo`'s 
marshalled layout changed. They coincide today, so nothing misbehaves; a minor 
version bump parts them and every existing object would then be read with the 
wrong unmarshaller.
   
   Pin the comparison to a constant naming that boundary, with a static_assert 
so the two cannot cross.
   
   `scanObject` skipped the dispatch entirely and called `HTTPInfo::unmarshal` 
directly, so scanning a pre-24.2 object already used the wrong unmarshaller. It 
now shares `unmarshal_helper`.
   
   `load_http_info` recomputes the well known string indices persisted in 
marshalled headers for older objects, and skipped anything from the RAM cache 
as already fixed up.
   
   That does not hold when the RAM cache is compressed: those entries are 
stored still marshalled and decompressed into a fresh buffer on every hit, so 
the indices stay stale. Move the fixup into `unmarshal_helper`, gated on the 
alt still being `MARSHALED`, which holds exactly when this reader owns the 
buffer it repairs.
   
   The old placement had no such guard and could mutate a block other readers 
were aliasing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to