Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可否使用filter过滤db #522

Open
zonshy opened this issue Nov 6, 2022 · 3 comments
Open

可否使用filter过滤db #522

zonshy opened this issue Nov 6, 2022 · 3 comments

Comments

@zonshy
Copy link

zonshy commented Nov 6, 2022

问题描述

可否使用filter过滤db,使用scan模式的时候,有一个db太大了,不想同步,怎么写这个filter进行忽略呢?谢谢!

@zonshy
Copy link
Author

zonshy commented Nov 7, 2022

skip_db.lua

function filter(id, is_base, group, cmd_name, keys, slots, db_id, timestamp_ms)
    if db_id == 3 then
        return 1, db_id  -- disallow
    else
        return 0, db_id  -- allow
    end
end

scan.toml
type = "scan"

是想将这个db3 过滤掉,这样db3仍然是被scan 并write到新的redis中。

@suxb201
Copy link
Member

suxb201 commented Nov 14, 2022

@zonshy 有没有可能目标 db 本身 db3 有数据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants