dogpile.cache icon indicating copy to clipboard operation
dogpile.cache copied to clipboard

.6x suggestion - change redis lock keys

Open sqlalchemy-bot opened this issue 9 years ago • 2 comments

Migrated issue, originally created by jvanasco (jvanasco)

the backend locks in redis is named as such (if you use the backend lock):

_lock{0}

i'd like to suggest a name change to one of the following:

_lock-{0}
_lock_{0}
_lck-{0}
_lck_{0}

why?

when inspecting the backends for keys, the current naming scheme is visually confusing - especially if your key begins with the letter "s"

for example, in this key -> lock pairing

 s|glbl|cnt -> _locks|glbl|cnt

when looking at hundreds of keys in a terminal window, this gets crazy confusing.

sqlalchemy-bot avatar May 29 '15 19:05 sqlalchemy-bot

Michael Bayer (zzzeek) wrote:

well if we change it midway things will really break for someone that upgrades only some of their clients to have the newer version. probably has to just be a config option.

sqlalchemy-bot avatar May 29 '15 20:05 sqlalchemy-bot

jvanasco (jvanasco) wrote:

It does. It also looks like there needs to some magic in there to suppress the errors caused by releasing an expired lock. pull request and sad trombone time :(

sqlalchemy-bot avatar May 29 '15 22:05 sqlalchemy-bot