Redis Blocking Save

How can I get Redis to lock? I use Ruby Redis Stone, but I think this question is not specific to this library. It seems that SAVE and BGSAVE commands seem to be fluttering, doing things in the background, causing "-ERR background save in progress" errors on subsequent calls.

Hopefully this will be a boring synchronous call that blocks all other Redis commands until the save on dump.rdb is over. And, hopefully, this will not require actually shutting down the server by resetting /etc/init.d/redis-server. Supposedly I should poll the LASTSAVE command?

+3
source share
3 answers

SAVE, , , BGSAVE, :

1) - BGSAVE 2) Redis ( ).

, SAVE , . , , , INFO.

+7

SAVE ; BGSAVE .

, , SAVE ?

0

Redis # save does just that. What version of Redis and redis gem are you using?

0
source

Source: https://habr.com/ru/post/1786943/


All Articles