Add pre-check for heavy debug log#15706
Conversation
| ) | ||
| ); | ||
| LOG.debug("Index status response" + response.getContent()); | ||
| if (LOG.isDebugEnabled()) { |
There was a problem hiding this comment.
I suppose the changes in this class are not really needed as it is just a test class anyway. The changes wouldn't really have any impact.
There was a problem hiding this comment.
Okie, already reverted this one
|
@fectrain , there seem to be a few code coverage issues. Please see if you can address them by adding /updating unit tests. |
|
Hello, @kfaraz! Thank you for your review and suggestions. I'm also thinking about this but haven't found a straightforward solution to address this coverage issue. One option might be to enable debug-level logging for the entire unit test package through modifications to the log property files, which I think may not be quite necessary. 😄 As this change only involves adding a condition check and adjusting the indentation of the original log line, which should not able to alter the original logic or introduce exceptions. So I think merging this change is fine. What do you think? |
|
@fectrain , yes, I agree that the changes here are simple enough to not cause any issue. But the problem is that it would also reduce the overall coverage of these classes because of the lines that are now inside the Enabling debug logging in tests doesn't seem to be a great option either as it would create unnecessary logs when running tests. See if you can reduce the number of lines in some cases. For example, the following code: can be rewritten as without compromising on readability. I know it's not a great solution but should help with the coverage to some extent. |
Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
92a659f to
fe25e53
Compare
fe25e53 to
ac203d7
Compare
|
Hi, @kfaraz, thanks for the advice. |
|
Hi @fectrain Can you pick up this PR again to resolve the conflict so that we can merge it? |
|
oh, I might have missed this one, let me refine on it, thanks for reminding @FrankChen021 |
Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
…rain/druid into add_prior_check_for_heavy_debug_log
|
Hi, @kfaraz , big thanks for all your advice on this. I've applied the changes you suggested and hope they're good to go for merging~ 🙏 |
|
The failing checks are all due to coverage of the new log lines. The coverage requirement is difficult to satisfy without enabling debug logging for all the relevant tests, which seems overkill. Going forward with the merge. |
Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com> Co-authored-by: Benedict Jin <asdf2014@apache.org>
* docs: add mermaid diagram support * fix crash when parsing data in data loader that can not be parsed (#15983) * update jetty to address CVE (#16000) * Concurrent replace should work with supervisors using concurrent locks (#15995) * Concurrent replace should work with supervisors using concurrent locks * Ignore supervisors with useConcurrentLocks set to false * Apply feedback * Add pre-check for heavy debug logs (#15706) Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com> Co-authored-by: Benedict Jin <asdf2014@apache.org> * Remove helm paths from CodeQL config (#16006) * docs: mention acid-compliance for metadb --------- Co-authored-by: Vadim Ogievetsky <vadim@ogievetsky.com> Co-authored-by: Jan Werner <105367074+janjwerner-confluent@users.noreply.github.com> Co-authored-by: AmatyaAvadhanula <amatya.avadhanula@imply.io> Co-authored-by: Sensor <fectrain@outlook.com> Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com> Co-authored-by: Benedict Jin <asdf2014@apache.org>
Fixes #15704
Description
Add pre-check for heavy debug log
Release note
This PR has: