ansh0014 opened a new pull request, #14088:
URL: https://github.com/apache/trafficserver/pull/14088

   Fixes #14064
   
   ### Background & Problem
   While looking into logging configuration reloads, I noticed that several 
records marked `RECU_DYNAMIC` in `RecordsConfig.cc` and read by 
`LogConfig::read_configuration_variables()` were missing from the callback list 
in `LogConfig::register_config_callbacks()`. Because of this, updating them at 
runtime with `traffic_ctl config set` wouldn't trigger a logging reload until 
some other registered record changed.
   
   In addition, `proxy.config.log.log_fast_buffer` wasn't being compared in 
`LogObject::operator==`, so even during a reload, running log objects were 
treated as identical and kept their old fast-buffering mode.
   
   ### Changes Made
   1. **Added missing callbacks in `LogConfig.cc`**:
      - Added `proxy.config.log.rolling_min_count`, 
`proxy.config.diags.logfile.rolling_min_count`, 
`proxy.config.output.logfile.rolling_min_count`, and 
`proxy.config.log.log_fast_buffer` to `names[]`.
      - Wrapped `registry.attach()` with `ink_assert(0 == ...)` similar to how 
`ReverseProxy.cc` does it, so any typos or unregistered records fail fast at 
startup during debug builds.
   
   2. **Updated `LogObject::operator==` in `LogObject.h`**:
      - Added `m_fast == old.m_fast` to the comparison so that changing 
`log_fast_buffer` properly recreates the log objects on reload instead of 
reusing stale ones.
   
   3. **Updated update types in `RecordsConfig.cc`**:
      - Changed `proxy.config.log.ascii_buffer_size` and 
`proxy.config.log.max_line_size` to `RECU_RESTART_TS`. The documentation 
already treats them as requiring a restart, so marking them restart-only avoids 
unexpected behavior without requiring complicated live buffer resizing.
   
   ### Testing
   Ran the logging Catch2 unit tests (`test_Log*` and `test_LogEntryJson`), and 
all 38 tests passed cleanly.


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