This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git


The following commit(s) were added to refs/heads/master by this push:
     new 4334194  Establishing a real minimum for the cache size, unless 
CacheSize configuration directive is 0
4334194 is described below

commit 4334194676b2e2b819dd545c0f0fd4753e80ed0f
Author: Massimo Manghi <mxman...@apache.org>
AuthorDate: Tue Nov 26 11:47:18 2024 +0100

    Establishing a real minimum for the cache size, unless CacheSize 
configuration directive is 0
---
 ChangeLog                           | 23 ++++++++++++++++-------
 VERSION                             |  2 +-
 src/mod_rivet_ng/mod_rivet.h        | 17 +----------------
 src/mod_rivet_ng/mod_rivet_cache.c  |  6 ++++--
 src/mod_rivet_ng/mod_rivet_cache.h  |  6 ++++++
 src/mod_rivet_ng/mod_rivet_common.c |  2 +-
 6 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ad6fbf4..74621f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,11 @@
-2024-02-03 Massimo Manghi <mxman...@apache.org>
-    * doc/xml/lazybridge.xml: escaping some character that needed their 
corresponding SGML/HTML entities
-
-2024-02-02 Massimo Manghi <mxman...@apache.org>
-    * doc/xml/dio.xml: Documenting the support of Tdbc series of DBMS 
connectors
-    * doc/xml/lazybridge.xml: update with latest version of code
-    * src/mod_rivet_ng/rivet_lazy_mpm.c: cleaned code removing lines that had 
been commented out
+2024-11-26 Massimo Manghi <mxman...@apache.org>
+       * ChangeLog: reordered log entries that some past merge had misplaced
+       * VERSION: new version 3.2.7
+       * src/mod_rivet_ng/mod_rivet.h: Removed macro THREADED_TCL since unused 
and since Tcl
+         is now only threaded
+       * src/mod_rivet_ng/mod_rivet_cache.[h|c]: Introducing macro 
RIVET_CACHE_SIZE_MINIMUM.
+       This is the absolute minimum for the rivet cache size also when the 
estimated size based
+       on the ap_max_requests_per_child value drops below it
 
 2024-09-09 Massimo Manghi <mxman...@apache.org>
        * rivet/packages/dio: merging branch tdbc with DIO 1.2 and new dio 
connectors
@@ -51,6 +52,14 @@
        new function Rivet_RunChildScripts to execute
        both rivet_child_init_script and rivet_child_exit_script
 
+2024-02-03 Massimo Manghi <mxman...@apache.org>
+       * doc/xml/lazybridge.xml: escaping some character that needed their 
corresponding SGML/HTML entities
+
+2024-02-02 Massimo Manghi <mxman...@apache.org>
+       * doc/xml/dio.xml: Documenting the support of Tdbc series of DBMS 
connectors
+       * doc/xml/lazybridge.xml: update with latest version of code
+       * src/mod_rivet_ng/rivet_lazy_mpm.c: cleaned code removing lines that 
had been commented out
+
 2024-01-05 Massimo Manghi <mxman...@apache.org>
        * VERSION: bumped version number as 3.2.4
 
diff --git a/VERSION b/VERSION
index 34cde56..406ebcb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.2.6
+3.2.7
diff --git a/src/mod_rivet_ng/mod_rivet.h b/src/mod_rivet_ng/mod_rivet.h
index 94d40fa..3966d1e 100644
--- a/src/mod_rivet_ng/mod_rivet.h
+++ b/src/mod_rivet_ng/mod_rivet.h
@@ -57,21 +57,6 @@
 #define FILEDEBUGINFO
 #endif
 
-/* Configuration options  */
-
-/*
-   If you do not have a threaded Tcl, you can define this to 0.  This
-   has the effect of running Tcl Init code in the main parent init
-   handler, instead of in child init handlers.
- */
-#ifdef __MINGW32__
-#define THREADED_TCL 1
-#else
-#define THREADED_TCL 0 /* Unless you have MINGW32, modify this one! */
-#endif
-
-/* End Configuration options  */
-
 #define VAR_SRC_QUERYSTRING 1
 #define VAR_SRC_POST           2
 #define VAR_SRC_ALL            3
@@ -114,7 +99,7 @@ typedef struct _rivet_server_conf {
     char*       rivet_before_script;        /* script run before each page     
 */
     char*       rivet_after_script;         /*            after                
 */
 
-    /* 
--------------------------------------------------------------------------- */
+    /* 
------------------------------------------------------------------------ */
 
     /* This flag is used with the above directives. If any of them have 
changed, it gets set. */
 
diff --git a/src/mod_rivet_ng/mod_rivet_cache.c 
b/src/mod_rivet_ng/mod_rivet_cache.c
index e3f95b9..acae2f8 100644
--- a/src/mod_rivet_ng/mod_rivet_cache.c
+++ b/src/mod_rivet_ng/mod_rivet_cache.c
@@ -18,6 +18,8 @@
     under the License.
 */
 
+#include <sys/param.h>
+
 #include <apr_strings.h>
 #include <mpm_common.h>
 
@@ -44,9 +46,9 @@ extern mod_rivet_globals* module_globals;
 int RivetCache_DefaultSize (void)
 {
     if (ap_max_requests_per_child != 0) {
-        return  (ap_max_requests_per_child / 5);
+        return MAX(RIVET_CACHE_SIZE_MINIMUM,(ap_max_requests_per_child / 5));
     } else {
-        return 50;
+        return RIVET_CACHE_SIZE_MINIMUM;
     }
 }
 
diff --git a/src/mod_rivet_ng/mod_rivet_cache.h 
b/src/mod_rivet_ng/mod_rivet_cache.h
index 02ae752..ee8e125 100644
--- a/src/mod_rivet_ng/mod_rivet_cache.h
+++ b/src/mod_rivet_ng/mod_rivet_cache.h
@@ -21,6 +21,12 @@
 #ifndef __mod_rivet_cache_h__
 #define __mod_rivet_cache_h__
 
+/*
+ * This is the absolute minimum size of the cache, unless CacheSize is set
+ */
+
+#define RIVET_CACHE_SIZE_MINIMUM 50
+
 EXTERN int   RivetCache_DefaultSize (void);
 EXTERN void  RivetCache_Create  (apr_pool_t *p, rivet_thread_interp* 
interp_obj);
 EXTERN void  RivetCache_Cleanup (rivet_thread_private* 
private,rivet_thread_interp* rivet_interp);
diff --git a/src/mod_rivet_ng/mod_rivet_common.c 
b/src/mod_rivet_ng/mod_rivet_common.c
index 6eed1a2..4090c5d 100644
--- a/src/mod_rivet_ng/mod_rivet_common.c
+++ b/src/mod_rivet_ng/mod_rivet_common.c
@@ -635,7 +635,7 @@ void Rivet_CleanupRequest( request_rec *r )
  *
  * Setup an array in each interpreter to tell us things about Apache.
  * This saves us from having to do any real call to load an entire
- * environment.  This routine only gets called once, when the child process
+ * environment. This routine only gets called once, when the child process
  * is created.
  *
  *  Arguments:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@tcl.apache.org
For additional commands, e-mail: commits-h...@tcl.apache.org

Reply via email to