Salvatore
2012/2/14 Simão Mata <sim...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/yoSXHKSXFzQJ.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.
--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele
I mean: because your arch is 32bit, and your AOF is > 4GB.
Make sure to use 2.4 that has automatic rewriting!!! ;) (but not an
excuse for this bug).
I'll ping back when a patch is available, was not a matter of overflow
actually, but it needs to be compiled with large file support and I
can't do this right now in real time, so I'll provide a patch in the
next 24h.
Please try this if you need to restart your instance ASAP:
1) Fix the AOF in a 64 bit instance. Not sure it is possible for you.
2) Alternatively... edit aof.c, there is something like:
readerr:
if (feof(fp)) {
redisLog(REDIS_WARNING,"Unexpected end of file reading the
append only file");
} else {
redisLog(REDIS_WARNING,"Unrecoverable error reading the append
only file: %s", strerror(errno));
}
exit(1);
fmterr:
redisLog(REDIS_WARNING,"Bad file format reading the append only
file: make a backup of your AOF file, then use ./redis-check-aof --fix
<filename>");
exit(1);
Where there is exit(1) (there are two instances), replace it with
"return REDIS_OK;"
Compile and use this modified binary to restart Redis for the first
time. rewrite the AOF log with BGREWRITEAOF so that it will take a
convenient amount of space (< 4GB on disk), and then restart with an
unmodified Redis 2.4.
I hope this helps.
Cheers,
Salvatore
You are right, it is broken with > 2GB files. Actually it WAS broken, I
just committed a fix in the 2.4 branch, now redis-check-aof is sane
for > 2GB files on 32bit systems. Please use this instead of the
modified Redis, much better.
Sorry for this issue, it was in my TODO list since a lot of time, but
this was a critical bug and I made an error not fixing it ASAP.
> Thanks Salvatore, the patch worked, the aof was fixed and redis is now
> running again.
Cool! Likely this problem will not happen again now that we fixed the
AOF utility.