This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 40b66f731e4752d8ee8e6674a210a3e28ca6a4bf
Author: Jack Drogon <jack.xsuper...@gmail.com>
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 <jack.xsuper...@gmail.com>
---
 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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to