"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/sentinel.c" between
redis-6.0.7.tar.gz and redis-6.0.8.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

sentinel.c  (redis-6.0.7):sentinel.c  (redis-6.0.8)
skipping to change at line 1957 skipping to change at line 1957
* Before returning the function calls fsync() against the generated * Before returning the function calls fsync() against the generated
* configuration file to make sure changes are committed to disk. * configuration file to make sure changes are committed to disk.
* *
* On failure the function logs a warning on the Redis log. */ * On failure the function logs a warning on the Redis log. */
void sentinelFlushConfig(void) { void sentinelFlushConfig(void) {
int fd = -1; int fd = -1;
int saved_hz = server.hz; int saved_hz = server.hz;
int rewrite_status; int rewrite_status;
server.hz = CONFIG_DEFAULT_HZ; server.hz = CONFIG_DEFAULT_HZ;
rewrite_status = rewriteConfig(server.configfile); rewrite_status = rewriteConfig(server.configfile, 0);
server.hz = saved_hz; server.hz = saved_hz;
if (rewrite_status == -1) goto werr; if (rewrite_status == -1) goto werr;
if ((fd = open(server.configfile,O_RDONLY)) == -1) goto werr; if ((fd = open(server.configfile,O_RDONLY)) == -1) goto werr;
if (fsync(fd) == -1) goto werr; if (fsync(fd) == -1) goto werr;
if (close(fd) == EOF) goto werr; if (close(fd) == EOF) goto werr;
return; return;
werr: werr:
if (fd != -1) close(fd); if (fd != -1) close(fd);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)