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

twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 170b4afc9 chore(function): make LUA_GC_CYCLE_PERIOD a global constant 
(#3116)
170b4afc9 is described below

commit 170b4afc923605b5821c576fb9b64e18338fa7f8
Author: Twice <[email protected]>
AuthorDate: Sat Aug 16 14:22:33 2025 +0800

    chore(function): make LUA_GC_CYCLE_PERIOD a global constant (#3116)
---
 src/storage/scripting.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/storage/scripting.cc b/src/storage/scripting.cc
index c9d88270e..b5f865ac2 100644
--- a/src/storage/scripting.cc
+++ b/src/storage/scripting.cc
@@ -49,6 +49,8 @@
  * This should be the size of the buffer given to doule to string */
 constexpr size_t MAX_LONG_DOUBLE_CHARS = 5 * 1024;
 
+constexpr int64_t LUA_GC_CYCLE_PERIOD = 50;
+
 enum {
   LL_DEBUG = 0,
   LL_VERBOSE,
@@ -443,7 +445,6 @@ Status FunctionCall(redis::Connection *conn, 
engine::Context *ctx, const std::st
    * The call is performed every LUA_GC_CYCLE_PERIOD executed commands
    * (and for LUA_GC_CYCLE_PERIOD collection steps) because calling it
    * for every command uses too much CPU. */
-  constexpr int64_t LUA_GC_CYCLE_PERIOD = 50;
   static int64_t gc_count = 0;
 
   gc_count++;
@@ -726,7 +727,6 @@ Status EvalGenericCommand(redis::Connection *conn, 
engine::Context *ctx, const s
    * The call is performed every LUA_GC_CYCLE_PERIOD executed commands
    * (and for LUA_GC_CYCLE_PERIOD collection steps) because calling it
    * for every command uses too much CPU. */
-  constexpr int64_t LUA_GC_CYCLE_PERIOD = 50;
   static int64_t gc_count = 0;
 
   gc_count++;

Reply via email to