This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new e7d67e9411c [fix](be) resolves some unused-raii and used-after-moved
issues (#29285)
e7d67e9411c is described below
commit e7d67e9411c79c843ce0c3c822905fdd7a089c2e
Author: py023 <[email protected]>
AuthorDate: Sat Dec 30 12:14:49 2023 +0800
[fix](be) resolves some unused-raii and used-after-moved issues (#29285)
---
be/src/agent/task_worker_pool.cpp | 2 +-
be/src/http/action/config_action.cpp | 1 -
be/src/io/fs/s3_file_system.cpp | 5 +----
be/src/vec/columns/column_array.cpp | 4 ++--
be/src/vec/columns/column_map.cpp | 2 +-
5 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/be/src/agent/task_worker_pool.cpp
b/be/src/agent/task_worker_pool.cpp
index 97bf7f700a1..f9d43ba2318 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -590,7 +590,7 @@ ReportWorker::ReportWorker(std::string name, const
TMasterInfo& master_info, int
};
auto st = Thread::create("ReportWorker", _name, report_loop, &_thread);
- CHECK(st.ok()) << name << ": " << st;
+ CHECK(st.ok()) << _name << ": " << st;
}
ReportWorker::~ReportWorker() {
diff --git a/be/src/http/action/config_action.cpp
b/be/src/http/action/config_action.cpp
index 4ee196be651..a9de9dc2406 100644
--- a/be/src/http/action/config_action.cpp
+++ b/be/src/http/action/config_action.cpp
@@ -118,7 +118,6 @@ void ConfigAction::handle_update_config(HttpRequest* req) {
std::string status(s.ok() ? "OK" : "BAD");
rapidjson::Value result;
result.SetObject();
- rapidjson::Value(key.c_str(), key.size(), results.GetAllocator());
result.AddMember("config_name",
rapidjson::Value(key.c_str(), key.size(),
results.GetAllocator()),
results.GetAllocator());
diff --git a/be/src/io/fs/s3_file_system.cpp b/be/src/io/fs/s3_file_system.cpp
index c8206668498..a88d9851ad4 100644
--- a/be/src/io/fs/s3_file_system.cpp
+++ b/be/src/io/fs/s3_file_system.cpp
@@ -114,7 +114,7 @@ S3FileSystem::S3FileSystem(S3Conf&& s3_conf, std::string&&
id)
}
}
_executor = Aws::MakeShared<Aws::Utils::Threading::PooledThreadExecutor>(
- id.c_str(), config::s3_transfer_executor_pool_size);
+ _id.c_str(), config::s3_transfer_executor_pool_size);
}
S3FileSystem::~S3FileSystem() = default;
@@ -211,9 +211,6 @@ Status S3FileSystem::delete_directory_impl(const Path& dir)
{
return Status::IOError("fail to delete object: {}",
error_msg(e.GetKey(), e.GetMessage()));
}
- VLOG_TRACE << "delete " << objects.size()
- << " s3 objects, endpoint: " << _s3_conf.endpoint
- << ", bucket: " << _s3_conf.bucket << ", prefix: " <<
_s3_conf.prefix;
}
is_trucated = result.GetIsTruncated();
request.SetContinuationToken(result.GetNextContinuationToken());
diff --git a/be/src/vec/columns/column_array.cpp
b/be/src/vec/columns/column_array.cpp
index c936c28b885..0c926c0f31e 100644
--- a/be/src/vec/columns/column_array.cpp
+++ b/be/src/vec/columns/column_array.cpp
@@ -95,11 +95,11 @@ ColumnArray::ColumnArray(MutableColumnPtr&& nested_column,
MutableColumnPtr&& of
LOG(FATAL) << "offsets_column must be a ColumnUInt64";
}
- if (!offsets_concrete->empty() && nested_column) {
+ if (!offsets_concrete->empty() && data) {
auto last_offset = offsets_concrete->get_data().back();
/// This will also prevent possible overflow in offset.
- if (nested_column->size() != last_offset) {
+ if (data->size() != last_offset) {
LOG(FATAL) << "offsets_column has data inconsistent with
nested_column";
}
}
diff --git a/be/src/vec/columns/column_map.cpp
b/be/src/vec/columns/column_map.cpp
index 4d831e01f9e..6981c25fc23 100644
--- a/be/src/vec/columns/column_map.cpp
+++ b/be/src/vec/columns/column_map.cpp
@@ -53,7 +53,7 @@ ColumnMap::ColumnMap(MutableColumnPtr&& keys,
MutableColumnPtr&& values, Mutable
LOG(FATAL) << "offsets_column must be a ColumnUInt64";
}
- if (!offsets_concrete->empty() && keys && values) {
+ if (!offsets_concrete->empty() && keys_column && values_column) {
auto last_offset = offsets_concrete->get_data().back();
/// This will also prevent possible overflow in offset.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]