I am testing out various features of GCP whilst my company ramps our product to production. This evening I have found that whilst using a sorted set in Redis that it seems to be losing data.
I have a sorted set being updated with additional scores twice an hour (adding two values and scores each hour). Today I was in the cli and did a zrangebyscore -/+ inf and got back 146 keys. An hour later I do the same and get back 146 keys which made me think damn its not being updated but on closer inspection it was. The new keys where there and two keys from the middle of the set had just disappeared.
I don't in my code have any deletes or removals from the sets so I am at a loss as to what is going on. I can only get its something to do with the snapshotting, I am persisting once an hour but this could be completely unrelated.
I have used Redis Enterprise in other projects without any such issues.
Does anyone know of any bugs / limitations / gotchas which could cause something like this to happen?
Thanks in advance,
Tom
Solved! Go to Solution.
If you don't have a support package with Google Cloud, it can be a bit challenging to get direct help, but there are still a few steps you can take:
I understand this is a challenging situation. Navigating issues without direct support can be tough.
In Google Cloud Memorystore, there are a few things that could be causing data loss in your Redis sorted set:
Here are some additional things you can check:
Here are some additional tips for using Redis sorted sets in Google Cloud Memorystore:
Thank you for your reply
If you don't have a support package with Google Cloud, it can be a bit challenging to get direct help, but there are still a few steps you can take:
I understand this is a challenging situation. Navigating issues without direct support can be tough.
Thanks @ms4446 I have found the issue.
For posterity and for anyone seeing the same issue... check your ordering of the score and value.... you have them the wrong way round 🤔
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |