Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Not allow modify dir while a child process is running
If a forked child process is running, modifying dir is not allowed. I can think of two problems at present: 1. If dir is modified during aof rewrite, we will leave the tmp files on the disk. Because the rename operation of the main process in backgroundRewriteDoneHandler will fail. Of course, we can stop aof rewrite when modifying dir, and restart aof rewrite after the modiry. 2. Both the parent and child processes may call serverLog to write logs, and modifying dir will cause the child process to write logs in the old dir and the parent process to write logs in the new dir. Because they fopen the file every time they call serverLog. (PS. we may need to change it to open only once in the future). Signed-off-by: Binbin <[email protected]>
- Loading branch information