You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2023/01/05 19:30:47 UTC

[GitHub] [trafficserver] bneradt commented on a diff in pull request #9285: Do not track config file periodically

bneradt commented on code in PR #9285:
URL: https://github.com/apache/trafficserver/pull/9285#discussion_r1062761674


##########
src/records/RecLocal.cc:
##########
@@ -71,7 +71,9 @@ sync_thr(void *data)
     RecSyncStatsFile();
 
     // If we didn't successfully sync to disk, check whether we need to update ....
-    if (check) {
+    bool found;
+    int track_time = static_cast<int>(REC_readInteger("proxy.config.track_config_files", &found));
+    if (found && track_time > 0 && check) {

Review Comment:
   It looks like `check` is initialized to true, never changed, then used in this conditional expression. If I'm reading this correctly, let's just remove it while we're updating this expression.



##########
doc/admin-guide/files/records.config.en.rst:
##########
@@ -601,6 +601,14 @@ Local Manager
    This setting is not reloadable, since it is must be applied when
    :program:`traffic_manager` initializes.
 
+.. ts:cv:: CONFIG proxy.config.track_config_files INT 1
+
+   Enables (``1``) or disables (``0``) tracking configuration file updates.
+   This setting is enabled by default. Disabling this setting disables the config status of traffic_ctl.

Review Comment:
   Let's describe a motivation for this configuration. Here's a suggestion for the first paragraph:
   
   ```
   Enables (``1``) or disables (``0``) tracking configuration file updates.
   This setting is enabled by default, meaning that configuration files are monitored for changes.
   Having tracking enabled is a dependency for :option:`traffic_ctl config status` to function. However,
   tracking the files is implemented via a frequent call to ``stat()`` which may be problematic
   in some deployments. If the call to ``stat()`` on configuration files causes problems, then
   it can be avoided by setting this value to ``0`` at the cost of disabling the config status feature
   for :program:`traffic_ctl`.
   ```



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