Skip to content

Doc: remove references to set-debug TXN_DEBUG in header_rewrite/hrw4u#12918

Open
mlibbey wants to merge 1 commit intoapache:masterfrom
mlibbey:rmdebug
Open

Doc: remove references to set-debug TXN_DEBUG in header_rewrite/hrw4u#12918
mlibbey wants to merge 1 commit intoapache:masterfrom
mlibbey:rmdebug

Conversation

@mlibbey
Copy link
Contributor

@mlibbey mlibbey commented Feb 26, 2026

The set-http-cntl TXN_DEBUG and (deprecated) set-debug need a non-overridable config (proxy.config.diags.debug.enabled) to be on. But, if its on, then you don't need header_rewrite to conditionally turn it on. (I suppose turning it off could be a use case, but, that would also require rewriting the docs).

The set-http-cntl TXN_DEBUG and (deprecated) set-debug need a non-overridable config
(proxy.config.diags.debug.enabled) to be on. But, if its on, then you don't need header_rewrite to conditionally turn it on. (I suppose turning it off could be a use case, but, that would also require rewriting the docs).
@mlibbey mlibbey requested review from bneradt and zwoop February 26, 2026 17:27
@mlibbey mlibbey self-assigned this Feb 26, 2026
@maskit
Copy link
Member

maskit commented Feb 26, 2026

Original discussion:
https://issues.apache.org/jira/browse/TS-1079

If I understand the original design correctly, the idea was that DebugSpecific() would work just like the old Debug() when not being "specific". But when enabled e.g. in a transaction or session, it would override the "global" defaults. So when the flag is true, it will always print the debug info, but when false it depends on whatever the global diags settings are.
The public TSDebugSpecific() API follows the same pattern as the core version I assume. Meaning, a plugin can now call TSDebugSpecific() in a way that it uses the global diagnostics settings when false, but forcing the Debug() when true. This seems generally useful to me.

This sounds like requiring the global setting to be enabled is a bug, but looks like even the initial implementation has the bug.
abf767e#diff-e0e00255e0c3acac2840eefc663f3fd3bc8c11bff8721a8f9a5e0c5521004153R294-R295

#define DebugSpecific(flag, tag, ...)  if (unlikely(diags->on())) flag ? diags->print(tag, DTA(DL_Debug), __VA_ARGS__) : \
                                                                    diags->log(tag, DTA(DL_Debug), __VA_ARGS__)

@maskit
Copy link
Member

maskit commented Feb 26, 2026

Another thing that should be noted is that majority of debug prints are not under the control of set-debug/TXN_DEBUG.

@zwoop
Copy link
Contributor

zwoop commented Feb 26, 2026

Well, if we kill this feature in the docs (I'm fine with it, sounds like this stuff no longer works), we should also mark the underlying APIs and features in InkAPI etc. as deprecated for 10.2 so we can delete those too from v11.

@maskit
Copy link
Member

maskit commented Feb 26, 2026

I'm also fine with removing it. Nobody realized that it doesn't work as expected for a long time. The idea is nice if it works though.

@bryancall bryancall added this to the 11.0.0 milestone Mar 2, 2026
@bryancall bryancall requested a review from moonchen March 2, 2026 22:50
@bryancall
Copy link
Contributor

@moonchen will see if this feature can be fixed instead of just removing the documentation

@mlibbey
Copy link
Contributor Author

mlibbey commented Mar 3, 2026

I'm +1 on a working feature. Guess my question is... is the right approach to bring back the documentation if/when it is working (eg, with the PRs that make it work)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants