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

Random "Error getting queue payload" in RedisQueue under load #80

Closed
Seadoo2017 opened this issue Dec 13, 2023 · 3 comments
Closed

Random "Error getting queue payload" in RedisQueue under load #80

Seadoo2017 opened this issue Dec 13, 2023 · 3 comments

Comments

@Seadoo2017
Copy link
Contributor

After recent package update we started getting this error message, we tracked the issue down to a change done in RedisCacheClient.
All the read operations now use CommandFlags.PreferReplica (changed in this commit: 8ea1bf1)

Sometimes, the replica might not have the data when a read operation is performed right after write operation.
So this cache change breaks RedisQueue randomly.

My suggestion is to revert the change or allow injecting the required behavior.

@ejsmith
Copy link
Contributor

ejsmith commented Dec 13, 2023

Would you mind creating a PR that adds a read mode to the redis options? So we can set it to PreferReplica or PreferMaster.

@Seadoo2017
Copy link
Contributor Author

Hi, added pull request (#81)
I added read mode to options + reverted the default behavior to none as the new behavior is breaking existing code.
Due to the nature of this issue, I didn't think of any good way to add unit test to test this change / demonstrate the breaking change in unit test, any ideas?

I gave access in the option to the original CommandFlags with all the available options to have full flexibility, do you prefer a new smaller enum / boolean option?

Thank you.

@Seadoo2017
Copy link
Contributor Author

@ejsmith I apologize but I had to open a new PR (#82) because I messed up the author at the first one so it didn't let me sign the CLA, this one is the same with the correct author.

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