-
Notifications
You must be signed in to change notification settings - Fork 445
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
remove problems reports #5019
base: main
Are you sure you want to change the base?
remove problems reports #5019
Conversation
Removes problem reports and replaces them with log messages that identify the file and table that had the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issue with these changes. But I'm wondering if all of the log messages that occur next to the removed ProblemReport should all go to a centralized Logger, including the ProblemReportingIterator.
I will take a pass at improving the log messages logger, may be able to use the table files logger in some cases. |
We've discussed having an "event" type logger. Not sure if that makes things simpler vs having a dedicated logger for problems. Using MDC (Mapped Diagnostic Context) might make this easier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I really like this change. I think it simplifies a lot of custom problem reporting that is better handled with logging or other system monitoring that the user might deploy.
I would like to apply this change to the 3.1 branch, and I think we should add a notice about it being removed in the 2.1.4 release.
server/base/src/main/java/org/apache/accumulo/server/compaction/FileCompactor.java
Outdated
Show resolved
Hide resolved
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java
Show resolved
Hide resolved
…n/FileCompactor.java Co-authored-by: Christopher Tubbs <[email protected]>
I don't think it would make it easier. slf4j, log4j 1.2, and log4j2 all have different thread-local context concepts, and it requires a converter to switch between them. It really introduces a lot of complexity, from using more of the slf4j API rather than treating it as a simple logging facade, to adding extra configuration and possibly code to convert between them, and modifying the logging templates to include the map context. It also forces developers to think about thread-local views of the context, every time you want to include thread-local context in a log message, and is likely going to lead to a lot of programmer errors with regard to logging (like not realizing that a log message originating from a class executed in an executor won't inherit the context, when refactoring code that logs). It'd be much easier to just avoid MDC and ThreadLocalContext for logging, and limit our use of slf4j to a very simple logging facade for the basic log level methods |
@dlmarion updated the logging to use some of the existing named loggers for tablet events in 111a7e5 |
if (e.getMessage() != null) { | ||
log.warn("{}", e.getMessage()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines seemed kinda pointless so I removed them. Not sure if I am missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing it looks right to me.
@ctubbsii if you want to apply this change to the 3.1 branch that is fine with me. I am finished making changes with this branch so feel free to do whatever you think is best to get these changes to 3.1. |
Okay. Please hold off on merging it, then. I'll rebase it onto the 3.1 branch, and move the upgrade code to the 3.1 upgrade code. The notice on the 2.1 monitor can be added in a subsequent change. But, I don't want this merged, because the target upgrade code will be different, and it will cause unnecessary conflicts if merged to main first. |
Removes problem reports and replaces them with log messages that identifies the file and table that had the error.