Hi all,

I'd like to propose the introduction of a new TS API,
TSHttpTxnCacheDiskPathGet. The function signature is as follows:

tsapi TSReturnCode TSHttpTxnCacheDiskPathGet(TSHttpTxn txnp, const char **path);

The intent of this API is to expose the underlying disk used to
service a request, regardless of whether the request is a cache hit or
miss. This is necessary because, as far as I know, there has
historically been no way to easily obtain this information on a
running system. This makes troubleshooting storage problems arduous
because unless there's a major outlier, it's very difficult to
determine which disk holds a particular object.

In terms of the API itself, it relies on `const char **` to ensure the
underlying path doesn't get modified and to avoid unnecessary copying
since this is a read-only value.

The API and all dependent changes can be seen in this PR:
https://github.com/apache/trafficserver/pull/7783

These changes are being introduced to support an enhancement to the
xdebug plugin that can be found here:
https://github.com/apache/trafficserver/pull/7784

Feedback welcome!
--
Thanks,
Jeff

Reply via email to