djveremix / redis

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

Disk space full crashes redis-server (upon restart) #303

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start redis-server 1.2.6 with dumping of data to dump.rdb
2. Use hard disk to 100%
3. Stop redis. Free disk space. Try starting redis with the same configuration

What is the expected output? What do you see instead?
What's happening is that while the disk space is full and redis wants to write 
to dump.rdb, it writes a zero byte file. And during restart redis tries to read 
from that zero byte file and dies with the error (in logs): "Short read or OOM 
loading DB. Unrecoverable error, aborting now." (This should be logged in error 
level but somehow it is only logged if you enable debug level. Strange. 

What version of the product are you using? On what operating system?
1.2.6 - Ubuntu 9.1

Please provide any additional information below.

Original issue reported on code.google.com by paras1...@gmail.com on 7 Aug 2010 at 9:45

GoogleCodeExporter commented 9 years ago
Accepted, thanks for reporting, It is unlikely this will be fixed in 1.2 as 2.0 
is going to be released.

I'll fix the issue and report here asap.

Cheers,
Salvatore

Original comment by anti...@gmail.com on 30 Aug 2010 at 9:54

GoogleCodeExporter commented 9 years ago

Original comment by anti...@gmail.com on 30 Aug 2010 at 9:54

GoogleCodeExporter commented 9 years ago
Can't replicate in 2.x... I guess the problem is now fixed. This is the current 
behavior:

1) Redis will try to save in the background process.
2) On write error (no space left on device) the operation will be aborted at 
all.
3) The file will not get overwritten (dump.rdb I mean), so the server will 
restart cleanly.

I don't see how this problem can be present in 1.2 as well but did not tried. 
Please can you provide the steps you used to reproduce the problem? Thank you.

Cheers,
Salvatore

Original comment by anti...@gmail.com on 30 Aug 2010 at 10:19

GoogleCodeExporter commented 9 years ago
Steps are same as I wrote. Redis did produce a 0 byte file when disk space was 
full.

Original comment by paras1...@gmail.com on 30 Aug 2010 at 10:36

GoogleCodeExporter commented 9 years ago
Ok, it's no longer the case with 2.0 and Redis master apparently :) I did many 
tests, so I'm closing this issue. Thanks for reporting!

Original comment by anti...@gmail.com on 31 Aug 2010 at 3:25