]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/lua: create fresh VM for each background script execution 67396/head
authorRotem Shapira <rotem.rs@gmail.com>
Wed, 18 Feb 2026 13:51:45 +0000 (13:51 +0000)
committerRotem Shapira <rotem.rs@gmail.com>
Tue, 10 Mar 2026 19:14:47 +0000 (19:14 +0000)
commit52d46b496cb7896a79bfde15e21af6f63a0e7026
tree3622651eab52485a1577f42a79f415a0d39a7168
parent16c48425c07c472fd10b948a2dcffad271384521
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