ywkaras commented on PR #11653:
URL: https://github.com/apache/trafficserver/pull/11653#issuecomment-2272087896

   The best way I can think of to have a per-transaction pointer to a `defer` 
counter in the heap is with a user pointer.  (The `authproxy` plugin, for 
example, uses one.)
   ```
   wkaras ~/LOCAL_REPOS/TS/plugins/authproxy
   $ grep -Fn 'TSUserArg' authproxy.cc
   186:    opt = static_cast<AuthOptions *>(TSUserArgGet(this->txn, 
AuthTaggedRequestArg));
   676:  return AuthTaggedRequestArg != -1 && TSUserArgGet(txn, 
AuthTaggedRequestArg) != nullptr;
   683:  AuthOptions *opt = static_cast<AuthOptions *>(TSUserArgGet(txn, 
AuthTaggedRequestArg));
   807:  TSReleaseAssert(TSUserArgIndexReserve(TS_USER_ARGS_TXN, "AuthProxy", 
"AuthProxy authorization tag", &AuthTaggedRequestArg) ==
   821:  TSReleaseAssert(TSUserArgIndexReserve(TS_USER_ARGS_TXN, "AuthProxy", 
"AuthProxy authorization tag", &AuthTaggedRequestArg) ==
   858:  TSUserArgSet(txn, AuthTaggedRequestArg, options);
   ```
   
   I suggest we stick with the approach that works when only one operator per 
hook needs to defer the transaction reenable ( 
https://github.com/ywkaras/trafficserver/commit/8ac223775573068fdb57cf5418b3c05d4474ccc0
 ).  We can add the approach with a defer counter in the future if we ever need 
it.


-- 
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