sqlalchemy / sqlalchemy/dogpile.cache
unable to detect when memcached isn't running
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 299
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Migrated issue, originally created by David Kavanagh ()
I've configured dogpile.cache to use memcached and the python-memcached package. I need to be able to detect when there is a failure to communicate to the memcached server. In python-memcached'd memcached.py file, the _set(..) method around line 814, a 0 is returned if the server is down. The set method returns a non-zero value on success. In the dogpile.cache.backends.memcached.py file around line 159, the set(..) method does nothing with the return value, as does the dogpile.cache.region.py file in the set(..) method. That makes it impossible to know and deal with a memcached set failure. I'd be happy to submit a patch, but wanted some feedback first. Perhaps raising a DogpileCacheException from the backend would be better.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with dogpile.cache.backends.memcached.py around the set method and dogpile.cache.region.py around set, then compare their behavior with python-memcached's _set method. Determine how a failed communication should be surfaced without changing successful writes, and verify that callers can distinguish a failed set from a successful one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- memcached, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100