You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "SolidWallOfCode (via GitHub)" <gi...@apache.org> on 2023/06/01 17:53:40 UTC

[GitHub] [trafficserver] SolidWallOfCode commented on pull request #9742: HostDB: cancelled action check when triggering pending

SolidWallOfCode commented on PR #9742:
URL: https://github.com/apache/trafficserver/pull/9742#issuecomment-1572530027

   Digging a bit deeper, I realize that I should document the state transistions for `HostDBContinuation`.
   
   The key point here is that when a HDBC is waiting for DNS, it's in a queue to compress all of the requests for the same target to a single request and not flood the nameserver. While in this state, cleanup is guarded by removal from that queue (see "HostDB.cc:1225" for an example). Therefore, once removed from the queue, it will no longer be cleaned up, therefore it should be possible to presume any HDBC removed from the queue is a valid object and can be checked for being canceled. There's no need to check later because the removal prevents the clean up. That is, if other asynchronous events cause a HDBC to terminate, no clean up will occur because the queue removal will fail. It seems to me that @masaori335 's recommendation is a better approach. I also do not think there is any cross talk between HDBC instances and even if so, it wouldn't cause a cleanup because of the queue removal guards.
   
   Note that all removals are done under the HostDB shard lock.


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org