tair-opensource / RedisShake

RedisShake is a Redis data processing and migration tool.
https://tair-opensource.github.io/RedisShake/
MIT License
3.86k stars 700 forks source link

v4.2.0版本修改DB出现异常 #871

Open tedgxt opened 1 month ago

tedgxt commented 1 month ago

问题描述(Issue Description)

使用v4.2.0 release,在function中修改DB号无效

Please provide a brief description of the issue you encountered.

环境信息(Environment)

日志信息(Logs)

如果有错误日志或其他相关日志,请在这里提供。

If there are any error logs or other relevant logs, please provide them here.

其他信息(Additional Information)

请提供任何其他相关的信息,如配置文件、错误信息或截图等。

Please provide any additional information, such as configuration files, error messages, or screenshots. v4.1.1版本是正常的。 function内容如下(源库的db5中的数据同步到目标库的db20):

# shake.toml
function = """

shake.log(DB)
if DB == 5 then
    DB = 20
end
shake.log(DB)
shake.call(DB, ARGV)

"""
suxb201 commented 1 month ago

配置项改了,需要加一个 [filter] :

[filter]
function = """

shake.log(DB)
if DB == 5 then
    DB = 20
end
shake.log(DB)
shake.call(DB, ARGV)

"""