dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
24.46k stars 884 forks source link

fix(server): Fix SCAN deadlock #3235

Closed dranikpg closed 1 day ago

dranikpg commented 3 days ago

Fix #3232 in simplest possible way

We should consider making SCAN a nokey transactional command

romange commented 1 day ago

@dranikpg what happens once SCAN is nokey transactional? does it mean it's a global transaction?

dranikpg commented 1 day ago

@dranikpg what happens once SCAN is nokey transactional? does it mean it's a global transaction?

No, it just will use the transactional style of running callbacks, so inlined scheduling will exist. However it doesn't fit into the transactional world, because it accesses all keys and is commonly used. Theoretically we shouldn't allow it then in script that don't request undeclared keys

but because it's so common, it would be really inconvenient