-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Refactor] Remove log_error from RuntimeState #51137
base: main
Are you sure you want to change the base?
Conversation
@@ -549,9 +529,6 @@ class RuntimeState { | |||
// Lock protecting _error_log and _unreported_error_idx | |||
std::mutex _error_log_lock; |
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.
Can this lock be removed too?
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, this can't be remove, it will be used to write error log of load to disk
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.
void RuntimeState::append_error_msg_to_file(const std::string& line, const std::string& error_msg, bool is_summary) {
std::lock_guard<std::mutex> l(_error_log_lock);
if (_query_options.query_type != TQueryType::LOAD) {
return;
}
// If file havn't been opened, open it here
if (_error_log_file == nullptr) {
Status status = create_error_log_file();
if (!status.ok()) {
LOG(WARNING) << "Create error file log failed. because: " << status.message();
if (_error_log_file != nullptr) {
_error_log_file->close();
delete _error_log_file;
_error_log_file = nullptr;
}
return;
}
}
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio rebase main |
Signed-off-by: trueeyu <[email protected]>
Signed-off-by: trueeyu <[email protected]>
Signed-off-by: trueeyu <[email protected]>
Signed-off-by: trueeyu <[email protected]>
✅ Branch has been successfully rebased |
87bf202
to
947e2b4
Compare
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]❌ fail : 2 / 4 (50.00%) file detail
|
Why I'm doing:
What I'm doing:
log_error will not be used by fe now, so it's safe to remove it.
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: