]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw/lua: create fresh VM for each background script execution lua-background-vm-fix
authorRotem Shapira <rotem.rs@gmail.com>
Wed, 18 Feb 2026 13:51:45 +0000 (13:51 +0000)
committerRotem Shapira <rotem.rs@gmail.com>
Fri, 6 Mar 2026 11:42:30 +0000 (11:42 +0000)
commitc6a2da0d0e9baa420710a15f92ebb1f4aa508de5
tree14d25d754a5fe5199eb65b4e527c9c2d15d5df26
parent69ca6d47cef0cd84bc6cab3983e5c437fd052f1a
rgw/lua: create fresh VM for each background script execution

Previously, the background thread reused the same Lua VM across
iterations, causing stale state to persist. This made operations
like 'pairs(RGW)' fail to iterate properly.

Now we create a fresh VM on each iteration, which:
- Fixes the iteration bug
- Simplifies the code (no need to update limits on existing VM)
- Ensures clean state for each script execution

Verified with unit tests:
- TableIterateBackground
- TableIterateBackgroundBreak
- TableIterateStepByStep

Fixes: https://tracker.ceph.com/issues/74839
Signed-off-by: Rotem Shapira <rotem.rs@gmail.com>
src/rgw/rgw_lua_background.cc
src/rgw/rgw_lua_utils.cc
src/rgw/rgw_lua_utils.h
src/test/rgw/test_rgw_lua.cc