Redis aof-load-truncated parameter

레디스 설정 파일인 redis.conf 에 있는 aof-load-truncated 파라미터에 대한 설명입니다.   이 파라미터는 3.0에서 추가되었습니다.


잘린(truncated) AOF 파일을 로드할 수 있도록 하였습니다. AOF 파일 잘림(truncated) 현상은 Ext4 파일 시스템에서 실행 중인 레디스 서버가 죽었을(crash) 때 아주 드물게 발생할 수 있습니다.   설명은 conf 파일에 있는 원문을 그대로 놓습니다.

An AOF file may be found to be truncated at the end during the Redis startup process, when the AOF data gets loaded back into memory.   This may happen when the system where Redis is running crashes, especially when an ext4 filesystem is mounted without the data=ordered option (however this can't happen when Redis itself crashes or aborts but the operating system still works correctly).

Redis can either exit with an error when this happens, or load as much data as possible (the default now) and start if the AOF file is found to be truncated at the end. The following option controls this behavior.

If aof-load-truncated is set to yes, a truncated AOF file is loaded and the Redis server starts emitting a log to inform the user of the event.   Otherwise if the option is set to no, the server aborts with an error and refuses to start.   When the option is set to no, the user requires to fix the AOF file using the "redis-check-aof" utility before to restart the server.

Note that if the AOF file will be found to be corrupted in the middle the server will still exit with an error.   This option only applies when Redis will try to read more data from the AOF file but not enough bytes will be found.

사용 방법

aof-load-truncated yes   (기본값)
aof-load-truncated no


질문하거나 댓글을 보려면 클릭하세요.  댓글수 :    조회수 :

Email 답글이 올라오면 이메일로 알려드리겠습니다.