sqlalchemy / sqlalchemy/dogpile.cache

unable to detect when memcached isn't running

Open
#64 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug low priority
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.