Incorrect error message occurs when flush operation is done to empty file
- Dominant language
- C
- Stars
- 108
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Propose a fix as shown below.
In c file: ./src/scr_flush_file.c
`@@ -405,9 +405,10 @@ int main (int argc, char *argv[])`
/* read in our flush file */
if (kvtree_read_path(file_path, hash) != KVTREE_SUCCESS) {
/* failed to read the flush file */
// scr_err("%s: Failed to read flush file '%s' @ %s:%d",
// PROG, file_path, __FILE__, __LINE__
// );
char *path_str = spath_strdup(file_path);
scr_warn("%s: Failed to read flush file %s @ %s:%d",
PROG, path_str, __FILE__, __LINE__);
free(path_str);
goto cleanup;
}
Contributor guide
Research direction
Open src/scr_flush_file.c and inspect main around the kvtree_read_path failure handling near line 405. Reproduce the flush operation with an empty file, compare the current error output with the proposed warning behavior, and confirm the command still reaches cleanup successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100