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

Skip check if redis_datatype is channel #1150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soulmachine
Copy link

@soulmachine soulmachine commented Mar 25, 2021

Fixes #1149

Changes

  • Fixed redis reader crash issue if redis_datatype is channel
  • Fixed redis reader crash issue if Redis server is empty

@@ -101,7 +101,7 @@ func NewReader(meta *reader.Meta, conf conf.MapConf) (reader.Reader, error) {

for _, val := range opt.key {
keyType, _ := client.Type(val).Result()
if dataType != keyType {
if keyType != "none" && dataType != keyType {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里判断下dataType是channel还是pattern channel,是的话就跳过。redis type是不能对channel执行的。

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

Successfully merging this pull request may close these issues.

logkit throws out error if redis_datatype is channel
2 participants