snehac-miner / redis

Automatically exported from code.google.com/p/redis
0 stars 0 forks source link

Ubuntu 9.10 /etc/init.d/redis-server [stop|restart] does not force a sync to disk #97

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you set() a key and then shut down before the scheduled sync, you lose
the data.  It should force a sync before shutdown (otherwise it becomes
difficult, if not impossible in some situations, to ever cleanly shut
down).  Thoughts?

Original issue reported on code.google.com by ryan.a.l...@gmail.com on 16 Nov 2009 at 4:58

GoogleCodeExporter commented 8 years ago
This isn't Ubuntu-specific; the initscript just sends a TERM signal to 
redis-server.

Original comment by ChrisLam...@gmail.com on 16 Nov 2009 at 11:01

GoogleCodeExporter commented 8 years ago
change init script to issue "./redis-cli shutdown"? if you search redis.c for 
"void shutdownCommand" you'll see the proper shutdown method.

Original comment by sicul...@gmail.com on 6 Jan 2010 at 7:36

GoogleCodeExporter commented 8 years ago
That's not ideal as then moving redis to a non-standard port / firewalling etc. 
would make the redis-cli call not 
work. From experience, this sort of addition doesn't work out too well.

Besides, simply shutting down in TERM would fix this transparently and make it 
work for any other initscript 
and people running redis without an initscript.

Original comment by ChrisLam...@gmail.com on 9 Mar 2010 at 4:24

GoogleCodeExporter commented 8 years ago
this is now fixed (as Chris suggested)

Original comment by anti...@gmail.com on 23 Aug 2010 at 3:38