You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected that message results would get stored in a namespaced key in Redis -- that is to say, that the message results would be something like {dramatiq}:results:<message-id>.
Issues
GitHub issues are for bugs. If you have questions, please ask them on the discussion board.
Checklist
What OS are you using?
Ubuntu 20.04
What version of Dramatiq are you using?
1.13.0
What did you do?
I'm investigating dramatiq for my project, and I set it up like so:
What did you expect would happen?
I expected that message results would get stored in a namespaced key in Redis -- that is to say, that the message results would be something like
{dramatiq}:results:<message-id>
.What happened?
The results got stored without the namespace. Looking at the code, it creates a nice namespaced string in the form of
%(namespace)s:%(queue_name)s:%(actor_name)s:%(message_id)s
at https://github.com/Bogdanp/dramatiq/blob/master/dramatiq/results/backend.py#L146, then tosses that all away and takes the md5 hash at https://github.com/Bogdanp/dramatiq/blob/master/dramatiq/results/backend.py#L152. This results in non-namespaced md5 hashes getting written to the Redis server, which could lead to md5 collisions with other non-namespaced services using the same server. Also, this prevents results from being used with a Redis hash tag in the event the upstream server is a Redis Cluster.The text was updated successfully, but these errors were encountered: