This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 790801973f9 [fix](compaction) use rowset meta FS in segcompaction and
add RPC client ready check (#55951)
790801973f9 is described below
commit 790801973f9cd3899c5181918b3ec4030ebc6bf3
Author: Luwei <[email protected]>
AuthorDate: Fri Sep 12 21:52:39 2025 +0800
[fix](compaction) use rowset meta FS in segcompaction and add RPC client
ready check (#55951)
1 Segcompaction uses the FS from rowset meta, leveraging the
functionality provided by the FS abstraction layer.
2 Add an interface in thrift_rpc_helper to check whether the RPC client
is ready, avoiding core dumps when BE has just started but the RPC
client is not yet initialized.
---
be/src/olap/rowset/beta_rowset_writer.cpp | 3 +--
be/src/util/thrift_rpc_helper.cpp | 2 +-
be/src/util/thrift_rpc_helper.h | 2 ++
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/be/src/olap/rowset/beta_rowset_writer.cpp
b/be/src/olap/rowset/beta_rowset_writer.cpp
index d80a63e4285..c78724324ef 100644
--- a/be/src/olap/rowset/beta_rowset_writer.cpp
+++ b/be/src/olap/rowset/beta_rowset_writer.cpp
@@ -388,8 +388,7 @@ Status
BetaRowsetWriter::_load_noncompacted_segment(segment_v2::SegmentSharedPtr
.is_doris_table = true,
.cache_base_path {},
};
- auto s = segment_v2::Segment::open(io::global_local_filesystem(), path,
- _rowset_meta->tablet_id(), segment_id,
rowset_id(),
+ auto s = segment_v2::Segment::open(fs, path, _rowset_meta->tablet_id(),
segment_id, rowset_id(),
_context.tablet_schema, reader_options,
&segment);
if (!s.ok()) {
LOG(WARNING) << "failed to open segment. " << path << ":" << s;
diff --git a/be/src/util/thrift_rpc_helper.cpp
b/be/src/util/thrift_rpc_helper.cpp
index cccc077a663..de5091cf7f1 100644
--- a/be/src/util/thrift_rpc_helper.cpp
+++ b/be/src/util/thrift_rpc_helper.cpp
@@ -54,7 +54,7 @@ using apache::thrift::transport::TSocket;
using apache::thrift::transport::TTransport;
using apache::thrift::transport::TBufferedTransport;
-ExecEnv* ThriftRpcHelper::_s_exec_env;
+ExecEnv* ThriftRpcHelper::_s_exec_env = nullptr;
void ThriftRpcHelper::setup(ExecEnv* exec_env) {
_s_exec_env = exec_env;
diff --git a/be/src/util/thrift_rpc_helper.h b/be/src/util/thrift_rpc_helper.h
index 3b2bfb45517..a0a73ad483b 100644
--- a/be/src/util/thrift_rpc_helper.h
+++ b/be/src/util/thrift_rpc_helper.h
@@ -47,6 +47,8 @@ public:
static Status rpc(const std::string& ip, const int32_t port,
std::function<void(ClientConnection<T>&)> callback, int
timeout_ms);
+ ExecEnv* get_exec_env() { return _s_exec_env; }
+
private:
static ExecEnv* _s_exec_env;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]