diff options
author | antirez <antirez@gmail.com> | 2017-12-11 11:21:48 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2017-12-11 11:21:48 +0100 |
commit | 2edd855651555081620ff45f30130148c93cb8e9 (patch) | |
tree | c658fd0745f724b321645ec168bb3c2e1c316b0b | |
parent | c01b804d3f614caabaa4853beae1cb7f56e764f0 (diff) | |
download | redis-2edd855651555081620ff45f30130148c93cb8e9.tar.gz |
Improve startLoadingFile() top comment.
-rw-r--r-- | src/rdb.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1560,9 +1560,11 @@ void startLoading(size_t size) { server.loading_total_bytes = size; } -/* Mark that we are loading in the global state and setup the fields - * needed to provide loading stats. - * 'filename' is optional and used for rdb-check on error */ +/* This is a wrapper for startLoading() that takes a file pointer instead of + * the size of the file, and does the work of calling fstat() to get the size. + * Moreover, if the optional 'filename' is passed, the global + * 'rdbFileBeingLoaded' is set, and will cause an RDB check on that file in + * case the loading of the file fails becuase of encoding errors. */ void startLoadingFile(FILE *fp, char* filename) { struct stat sb; if (fstat(fileno(fp), &sb) == -1) |