Re-write the Redis append-only file in the background.
重新写Redis的只能附加文件的背景。
用法----------Usage----------
redisBgRewriteAOF()
Details
详细信息----------Details----------
BGREWRITEAOF rewrites the Append Only File in the background when it gets too big. The Redis Append Only File is a Journal, so every operation modifying the dataset is logged in the Append Only File (and replayed at startup). This means that the Append Only File always grows. In order to rebuild its content the BGREWRITEAOF creates a new version of the append only file starting directly form the dataset in memory in order to guarantee the generation of the minimal number of commands needed to rebuild the database. (These details are copied verbatim from the Redis master documentation, see the references below.)
BGREWRITEAOF重写附加的背景中唯一的文件时,它变得太大。 Redis的附加文件是一个杂志,所以每一个操作修改数据集被记录在附加文件(和重播启动)。这意味着,仅新增文件就会变得。为了重建其内容的BGREWRITEAOF创建一个新版本的附加文件开始直接在内存中的数据集,以保证产生的数量最少需要重建数据库的命令。 (这些细节都一字不差地复制,从Redis的主文档,请参阅下面的参考资料)。