This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new f5cf008 [Bug] Fix stream load UT failed (#5692)
f5cf008 is described below
commit f5cf008bcc93ee7e8c9903e22b61e0cdcb908002
Author: weizuo93 <[email protected]>
AuthorDate: Fri Apr 23 09:33:42 2021 +0800
[Bug] Fix stream load UT failed (#5692)
Also move the stream load rocksdb dir to the first of storage root paths
---
be/src/common/config.h | 2 --
be/src/http/action/stream_load.cpp | 8 ++++----
be/src/olap/storage_engine.cpp | 12 ++++++++----
be/src/olap/storage_engine.h | 2 +-
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/be/src/common/config.h b/be/src/common/config.h
index 52c542c..8b4aab5 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -354,8 +354,6 @@ CONF_mInt32(stream_load_record_batch_size, "50");
CONF_Int32(stream_load_record_expire_time_secs, "28800");
// time interval to clean expired stream load records
CONF_mInt64(clean_stream_load_record_interval_secs, "1800");
-// the storage path of stream load record rocksdb
-CONF_String(stream_load_record_path, "${DORIS_HOME}");
// OlapTableSink sender's send interval, should be less than the real response
time of a tablet writer rpc.
// You may need to lower the speed when the sink receiver bes are too busy.
diff --git a/be/src/http/action/stream_load.cpp
b/be/src/http/action/stream_load.cpp
index bc73dc9..ca569bf 100644
--- a/be/src/http/action/stream_load.cpp
+++ b/be/src/http/action/stream_load.cpp
@@ -161,10 +161,10 @@ void StreamLoadAction::handle(HttpRequest* req) {
// add new line at end
str = str + '\n';
HttpChannel::send_reply(req, str);
-
+#ifndef BE_TEST
str = ctx->prepare_stream_load_record(str);
_sava_stream_load_record(ctx, str);
-
+#endif
// update statstics
streaming_load_requests_total->increment(1);
streaming_load_duration_ms->increment(ctx->load_cost_millis);
@@ -234,10 +234,10 @@ int StreamLoadAction::on_header(HttpRequest* req) {
str = str + '\n';
HttpChannel::send_reply(req, str);
streaming_load_current_processing->increment(-1);
-
+#ifndef BE_TEST
str = ctx->prepare_stream_load_record(str);
_sava_stream_load_record(ctx, str);
-
+#endif
return -1;
}
return 0;
diff --git a/be/src/olap/storage_engine.cpp b/be/src/olap/storage_engine.cpp
index fb2c45f..3747d91 100644
--- a/be/src/olap/storage_engine.cpp
+++ b/be/src/olap/storage_engine.cpp
@@ -227,15 +227,19 @@ Status StorageEngine::_init_store_map() {
_store_map.emplace(store->path(), store);
}
- RETURN_NOT_OK_STATUS_WITH_WARN(_init_stream_load_recorder(), "init
StreamLoadRecorder failed");
+ std::string stream_load_record_path = "";
+ if (!tmp_stores.empty()) {
+ stream_load_record_path = tmp_stores[0]->path();
+ }
+
+
RETURN_NOT_OK_STATUS_WITH_WARN(_init_stream_load_recorder(stream_load_record_path),
+ "init StreamLoadRecorder failed");
return Status::OK();
}
-Status StorageEngine::_init_stream_load_recorder() {
- std::string stream_load_record_path = config::stream_load_record_path;
+Status StorageEngine::_init_stream_load_recorder(const std::string&
stream_load_record_path) {
LOG(INFO) << "stream load record path: " << stream_load_record_path;
-
// init stream load record rocksdb
_stream_load_recorder.reset(new
StreamLoadRecorder(stream_load_record_path));
if (_stream_load_recorder == nullptr) {
diff --git a/be/src/olap/storage_engine.h b/be/src/olap/storage_engine.h
index 8a10ac5..dbae15b 100644
--- a/be/src/olap/storage_engine.h
+++ b/be/src/olap/storage_engine.h
@@ -245,7 +245,7 @@ private:
void _push_tablet_into_submitted_compaction(TabletSharedPtr tablet);
void _pop_tablet_from_submitted_compaction(TabletSharedPtr tablet);
- Status _init_stream_load_recorder();
+ Status _init_stream_load_recorder(const std::string&
stream_load_record_path);
private:
struct CompactionCandidate {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]