diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ac9b6564a..258f8197c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: - name: unit tests run: | ./src/valkey-unit-tests - + build-debian-old: runs-on: ubuntu-latest container: debian:buster diff --git a/src/defrag.c b/src/defrag.c index 4d34009f8b..074bb1a5a3 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -170,6 +170,7 @@ robj *activeDefragStringOb(robj *ob) { return activeDefragStringObEx(ob, 1); } +#ifdef USE_LUA /* Defrag helper for lua scripts * * returns NULL in case the allocation wasn't moved. @@ -189,6 +190,7 @@ luaScript *activeDefragLuaScript(luaScript *script) { return ret; } +#endif /* Defrag helper for dict main allocations (dict struct, and hash tables). * Receives a pointer to the dict* and return a new dict* when the dict @@ -302,7 +304,9 @@ void activeDefragSdsDict(dict *d, int val_type) { .defragVal = (val_type == DEFRAG_SDS_DICT_VAL_IS_SDS ? (dictDefragAllocFunction *)activeDefragSds : val_type == DEFRAG_SDS_DICT_VAL_IS_STROB ? (dictDefragAllocFunction *)activeDefragStringOb : val_type == DEFRAG_SDS_DICT_VAL_VOID_PTR ? (dictDefragAllocFunction *)activeDefragAlloc +#ifdef USE_LUA : val_type == DEFRAG_SDS_DICT_VAL_LUA_SCRIPT ? (dictDefragAllocFunction *)activeDefragLuaScript +#endif : NULL)}; do { cursor = dictScanDefrag(d, cursor, activeDefragSdsDictCallback, &defragfns, NULL); @@ -812,7 +816,9 @@ void defragOtherGlobals(void) { /* there are many more pointers to defrag (e.g. client argv, output / aof buffers, etc. * but we assume most of these are short lived, we only need to defrag allocations * that remain static for a long time */ +#ifdef USE_LUA activeDefragSdsDict(evalScriptsDict(), DEFRAG_SDS_DICT_VAL_LUA_SCRIPT); +#endif moduleDefragGlobals(); kvstoreDictLUTDefrag(server.pubsub_channels, dictDefragTables); kvstoreDictLUTDefrag(server.pubsubshard_channels, dictDefragTables);