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

fix: swapped dst and src arguments in zstd decode call #178

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

notmahsa
Copy link
Contributor

The decompress method in taskq/message.go uses the DecodeAll method from the compress/zstd package. The arguments (src, dst) are passed as (dst, src). Since in the taskq codebase the dst feature is not used, in the case where the zstd decoder is to be used, the decompress output will be empty.

  • side note: I made the decompress method a member of Message as it is used as such in this repo.

case "":
return m.ArgsBin, nil
case "zstd":
return zdec.DecodeAll(m.ArgsBin, nil)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The swap is here ^

@vmihailenco vmihailenco merged commit 9453f48 into vmihailenco:v3 Jun 22, 2022
@vmihailenco
Copy link
Owner

Thanks

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.

2 participants