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

Is it expected behaviour that Shlink will delete any and all keys in the Redis server? #1580

Closed
frankfil opened this issue Oct 21, 2022 · 5 comments · Fixed by #1623
Closed
Milestone

Comments

@frankfil
Copy link

How Shlink is set-up

  • Shlink Version: 3.3.2
  • How do you serve Shlink: Docker image
  • Database engine used: MySQL

Summary

Is it the expected behaviour, or is it a bug, that Shlink when configured to use Redis will delete ALL the Keys in Redis even ones it did not create?

In other words any existing Keys in Redis get deleted by Shlink almost immediately after starting up.

I could not find anything in the docs indicating that this would occur.

If this is the intended behaviour it might be nice to point this out in the docs lest someone find out the hard way!

@acelaya
Copy link
Member

acelaya commented Oct 21, 2022

No, that's not the expected behavior. There's no reason for Shlink to do that.

I will check it.

@acelaya acelaya added this to Shlink Oct 21, 2022
@milkogpetrov
Copy link

I think this might be a bug. I attached the log from redis-cli monitor after starting/restarting shlink instance.

Check line 95: ("1670580633.643543 [0 172.27.0.6:40652] "FLUSHDB")

redis-monitor-shlink-start.log

My set-up (all applications run as docker containers):

  • shlink-1 (ver 3.3.2)
  • shlink-2 (ver 3.3.2)
  • mariadb (ver 10.8)
  • redis (ver 6.2)

@acelaya acelaya added this to the 3.4.0 milestone Dec 9, 2022
@acelaya acelaya moved this to Todo 🗒️ in Shlink Dec 9, 2022
@acelaya
Copy link
Member

acelaya commented Dec 9, 2022

Wow, I would not expect that to happen. I wonder if this is the culprit. Need to check further what does that command actually do

@acelaya acelaya added the bug label Dec 9, 2022
@acelaya
Copy link
Member

acelaya commented Dec 9, 2022

Ok, yes, the command above does run a FLUSHDB when configured cache is redis and there's no cache namespace configured.

Apparently the cache namespace was accidentally removed from Shlink at some point. I will get it back to fix this.

@acelaya acelaya moved this from Todo 🗒️ to In Progress 📝 in Shlink Dec 10, 2022
@acelaya acelaya moved this from In Progress 📝 to In review 👀 in Shlink Dec 10, 2022
Repository owner moved this from In review 👀 to Done ✅ in Shlink Dec 10, 2022
@acelaya
Copy link
Member

acelaya commented Dec 10, 2022

I have just merged the fix for this. It will be included with Shlink 3.4.0

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

Successfully merging a pull request may close this issue.

3 participants