gtenev commented on a change in pull request #6880:
URL: https://github.com/apache/trafficserver/pull/6880#discussion_r446224178



##########
File path: doc/developer-guide/api/functions/TSPluginDSOReloadEnable.en.rst
##########
@@ -0,0 +1,46 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+.. include:: ../../../common.defs
+
+.. default-domain:: c
+
+TSPluginDSOReloadEnable
+*************************
+
+Control whether this plugin will take part in the remap dynamic reload 
preocess (remap.config)
+
+Synopsis
+========
+
+.. code-block:: cpp
+
+    #include <ts/ts.h>
+
+.. function:: TSReturnCode TSPluginDSOReloadEnable(int)
+
+Description
+===========
+
+:func:`TSPluginDSOReloadEnable` Set a flag to disable(`false`)/enable(`true`) 
a particular mixed(Global/Remap) plugin to take part in the dynamic reload 
mechanism. This function must be called from inside the :func:`TSPluginInit`.

Review comment:
       I think the term "mixed (Global/Remap) plugin" is vague and confusing. 
There are plugins in our source tree that can already run as Global and Remap 
plugins at the same time without the need of disabling the Remap plugin reload 
mechanism, i.e. `header_rewrite` and `cachekey` plugins.
   
   This API call actually provides the ability to enable or disable 
programmatically from within `TSPluginInit` the dynamic reloading when the same 
Dynamic Share Object (DSO) is used as a remap plugin as well, overriding 
`proxy.config.plugin.dynamic_reload_mode` configuration variable.
   
   Also can we document its return code, so the function user would not have 
read the code to see that it would return `TS_ERROR` if it is not called from 
inside `TSPluginInit`? Even test that in a unit-test?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to