Open
Description
Describe the bug
After upgrading from Redis 7 to Redis 8 (with search and query included), FT.CREATE
commands from a redis function (lua) fail with "Cannot perform
FT.CREATE: Cannot block"
To Reproduce
Steps to reproduce the behavior:
- Run a 6 node Redis 8 cluster in Docker (using redis:latest image) with RediSearch loaded in config
- Load a Redis function like
local function add_instance(keys, args)
local gameId = keys[1]
local indexResult = redis.pcall(
"FT.CREATE", "idx:g:{" .. gameId .. "}:instances", "ON", "HASH",
"PREFIX", 1, "g:{" .. gameId .. "}:i:", "SCHEMA",
"instanceId", "TAG",
"protocolVersion", "NUMERIC",
"gameVersion", "TAG",
"region", "TAG",
"playerCount", "NUMERIC", "SORTABLE",
"priority", "NUMERIC", "SORTABLE",
"privateInstanceHostId", "TAG",
"customQueueEligibleList", "TAG"
)
end
- FCALL this function with a gameId key and receive
"error":"Cannot perform
FT.CREATE: Cannot block"
Expected behavior
- Ability to create index from lua on a cluster using the {} to ensure we're operating on the same slots as the key passed.
Environment (please complete the following information):
- Version/branch Redis 8.0.2 with included RediSearch
Additional context
- Our Redis 7 cluster where this works is running with SAFEMODE enabled. I could not find any such config option (or similar concurrency controls) with the latest version