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

Deletion of digest doesn't work from admin UI #438

Closed
amitsaxena opened this issue Nov 6, 2019 · 11 comments
Closed

Deletion of digest doesn't work from admin UI #438

amitsaxena opened this issue Nov 6, 2019 · 11 comments
Assignees

Comments

@amitsaxena
Copy link

amitsaxena commented Nov 6, 2019

Describe the bug
When I try to delete a digest from sidekiq dashboard under unique digests tab, nothing happens and the digest stays. I am talking about this interface:
unique_digests_1

The digests I was trying to delete were some stuck locks preventing further jobs from being scheduled. I eventually had to delete the keys manually from redis.

I am using sidekiq-unique-jobs version 6.0.13

Expected behavior
The digest should be deleted and disappear from that page

Current behavior
The digest isn't deleted and stays on the page and the keys are still present in redis

@mhenrixon
Copy link
Owner

Super weird, are you using rails, sinatra, rack, grape? How do you run sidekiq web?

@amitsaxena
Copy link
Author

amitsaxena commented Nov 16, 2019

I am using Rails 5.2.2.1. We mount it as per the standard recommendation:

require "sidekiq/pro/web"
require "sidekiq_unique_jobs/web"
mount Sidekiq::Web => "/sidekiq"

The page shows up fine and clicking the Delete button sends a request and the page is refreshed. Just that the digest isn't deleted and stays on the page.

@amitsaxena
Copy link
Author

I am not sure if it's related, but I also see warnings like this:

[13] pry(main)> SidekiqUniqueJobs::Digests.del(digest: "5afaacdbee7148e90cea3c15de700f21")
Passing 'script' command to redis as is; administrative commands cannot be effectively namespaced and should be called on the redis connection directly; passthrough has been deprecated and will be removed in redis-namespace 2.0 (at /Users/amit/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sidekiq-unique-jobs-6.0.15/lib/sidekiq_unique_jobs/scripts.rb:73:in `script_sha')
2019-11-20T14:44:56.252Z pid=79457 tid=oxqpmk67d INFO: delete_by_digest(5afaacdbee7148e90cea3c15de700f21) completed in 0.02ms
=> 1

@mhenrixon
Copy link
Owner

Will be released as v6.0.17 shortly

@mhenrixon
Copy link
Owner

Released a fix as v6.0.17

@amitsaxena
Copy link
Author

This doesn't seem to be fixed for us. We are currently on version 6.0.18.

@mhenrixon
Copy link
Owner

Do you still have the same warnings in your logs @amitsaxena?

@mhenrixon mhenrixon reopened this Dec 9, 2019
@mhenrixon mhenrixon added the bug label Dec 9, 2019
@mhenrixon mhenrixon self-assigned this Dec 9, 2019
@mhenrixon mhenrixon added the v6.x label Dec 9, 2019
@amitsaxena
Copy link
Author

@mhenrixon Yes I still see the same warning.

@mhenrixon
Copy link
Owner

@amitsaxena the problem is with redis-namespace preventing this. The way sidekiq wires up redis-namespace prevents this gem from working properly. If you have any suggestions I'm all ears but currently my commands won't work because I can't use redis-namespace with lua scripts and the gem is all about lua scripts.

@mhenrixon
Copy link
Owner

This is documented here https://github.com/resque/redis-namespace#administrative-commands and I see no way to fix this in an easy way. I would have to manually namespace the keys somehow and I'm not sure I want to support that.

Mike Perham recommended strongly against using redis-namespace already back in 2015 https://www.mikeperham.com/2015/09/24/storing-data-with-redis/ and then went on to provide a migration solution towards not using it in https://www.mikeperham.com/2017/04/10/migrating-from-redis-namespace/.

I imagine he recommends against it for a reason (sidekiq-pro sidekiq-ent relies on Lua scripts to do the heavy lifting). Sorry about that.

@mhenrixon
Copy link
Owner

Closing due to limitations in redis-namespace.

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

No branches or pull requests

2 participants