Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Eliminate unnecessary error logging #4162

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Feb 2, 2024

During "CodeChecker store" the server checks the review status of reports. Review status may come from source code comments (e.g. // codechecker_suppress [core.DivideZero] This is false positive). The server needs to read the content of source files in order to find these comment sections. However, source code files are not uploaded to the server when both the following conditions hold:

  1. They were uploaded earlier with the same content by a previous "CodeChecker store" action.
  2. The client realizes that there is no source comment in the source file.

In these cases the server is emitting an error which tells that the source file was not uploaded. This error message is definitely not necessary, since there is no review status comment that could be read by the server or it had been read in a previous storage.

Since in practice there is a lot of such files, and the immense number of error logs results log files in gigabytes. This commit eliminates these error logs.

During "CodeChecker store" the server checks the review status of
reports. Review status may come from source code comments (e.g.
// codechecker_suppress [core.DivideZero] This is false positive).
The server needs to read the content of source files in order to find
these comment sections. However, source code files are not uploaded to
the server when both the following conditions hold:

1. They were uploaded earlier with the same content by a previous
"CodeChecker store" action.
2. The client realizes that there is no source comment in the source
file.

In these cases the server is emitting an error which tells that the
source file was not uploaded. This error message is definitely not
necessary, since there is no review status comment that could be read
by the server or it had been read in a previous storage.

Since in practice there is a lot of such files, and the immense number
of error logs results log files in gigabytes. This commit eliminates
these error logs.
Copy link
Collaborator

@vodorok vodorok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lGTM

@vodorok vodorok merged commit b6837cd into Ericsson:master Feb 5, 2024
8 checks passed
@bruntib bruntib deleted the eliminate_error_log branch February 5, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants