This is an automated email from the ASF dual-hosted git repository.
zykkk 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 789210bc384 [chore](format) Refactor BaseTablet _full_name by using
fmt replacing stringstream (#25400)
789210bc384 is described below
commit 789210bc38496c3c1379dee55661374ce531aae5
Author: Jack Drogon <[email protected]>
AuthorDate: Fri Oct 13 03:59:03 2023 -0500
[chore](format) Refactor BaseTablet _full_name by using fmt replacing
stringstream (#25400)
Signed-off-by: Jack Drogon <[email protected]>
---
be/src/olap/base_tablet.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/be/src/olap/base_tablet.cpp b/be/src/olap/base_tablet.cpp
index b65d373449a..928333c2cba 100644
--- a/be/src/olap/base_tablet.cpp
+++ b/be/src/olap/base_tablet.cpp
@@ -20,7 +20,6 @@
#include <fmt/format.h>
#include <glog/logging.h>
-#include <ostream>
#include <vector>
#include "gutil/strings/substitute.h"
@@ -42,10 +41,8 @@ BaseTablet::BaseTablet(TabletMetaSharedPtr tablet_meta,
DataDir* data_dir)
_schema =
TabletSchemaCache::instance()->insert(_tablet_meta->tablet_schema()->to_key());
_gen_tablet_path();
- std::stringstream ss;
- ss << _tablet_meta->tablet_id() << "." << _tablet_meta->schema_hash() <<
"."
- << _tablet_meta->tablet_uid().to_string();
- _full_name = ss.str();
+ _full_name = fmt::format("{}.{}.{}", _tablet_meta->tablet_id(),
_tablet_meta->schema_hash(),
+ _tablet_meta->tablet_uid().to_string());
_metric_entity =
DorisMetrics::instance()->metric_registry()->register_entity(
strings::Substitute("Tablet.$0", tablet_id()),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]