You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a module attempts to block a client from Lua or MULTI, the internal client handle is set to NULL and an error is sent to the user. This is not visible to the module, however, which continues to function and can modify the keyspace.
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> MULTI
OK
127.0.0.1:6379> MODULE_ADD keystring valstring
QUEUED
127.0.0.1:6379> EXEC
1) (error) ERR Blocking module command called from transaction
127.0.0.1:6379> keys *
1) "keystring"
127.0.0.1:6379> get keystring
"valstring"
@antirez looks to me that RM_BlockClient should free what it allocated and return NULL in that case, this way the module will be able to know it failed.
i hope it won't cause modules to crash, although today it may cause problems too, if the module continues the execution, unaware of the failure.
Tested on tip (7721fe8) of unstable and 4.0.11.
If a module attempts to block a client from Lua or MULTI, the internal client handle is set to NULL and an error is sent to the user. This is not visible to the module, however, which continues to function and can modify the keyspace.
module.c
:The text was updated successfully, but these errors were encountered: