Skip to content

Commit

Permalink
Revert "[C] Add debug log when remove(file) fails."
Browse files Browse the repository at this point in the history
This reverts commit df2bee5.
  • Loading branch information
vyazelenko committed Feb 10, 2025
1 parent 7f499e0 commit aa3609a
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions aeron-client/src/main/c/util/aeron_fileutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,21 +771,9 @@ bool aeron_raw_log_free(aeron_mapped_raw_log_t *mapped_raw_log, const char *file

if (NULL != filename && mapped_raw_log->mapped_file.length > 0)
{
int err_code = errno;
if (err_code != 0)
if (remove(filename) < 0 && aeron_file_length(filename) > 0)
{
fprintf(stdout, "*** [aeron_raw_log_free] errno is not zero: err_code=%d, err_msg=%s\n", err_code, strerror(err_code));
}

if (remove(filename) < 0)
{
err_code = errno;
fprintf(stdout, "*** [aeron_raw_log_free] remove failed: err_code=%d, err_msg=%s, file=%s\n", err_code, strerror(err_code), filename);

if (aeron_file_length(filename) > 0)
{
return false;
}
return false;
}

mapped_raw_log->mapped_file.length = 0;
Expand Down

0 comments on commit aa3609a

Please sign in to comment.