trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Carroll <>
Subject Document a restriction of TSHttpSsnHookAdd to session hooks
Date Wed, 02 Dec 2015 19:34:57 GMT
I've been exploring the implementation of the hook architecture in preparation for some work
on it I want to do. The issue that has come up is how hooks at the various scopes (global,
session, transaction) interact with regard to locking. If you look at (for instance) the HttpSM
logic to invoke hooks, it directly accesses the global hook structure. Currently this is "prevented"
by documentation that states the global hook add can only be called from TSPluginInit. Session
hooks did not have this problem for HTTP 1 because only one transaction could be running per
session and the hooks would have both the session and transaction locks. However, for HTTP/2
it becomes possible to have a race condition. I would like to add, as for the global case,
the rule that TSHttpSsnHookAdd can only be called from a session hook and not a transaction
hook. I doubt anyone is actually do that now so it should be relatively minor change.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message