diff --git a/be/src/cloud/cloud_tablet.cpp b/be/src/cloud/cloud_tablet.cpp index 07fd356c541f50..4f481026b64ac5 100644 --- a/be/src/cloud/cloud_tablet.cpp +++ b/be/src/cloud/cloud_tablet.cpp @@ -78,8 +78,8 @@ bool CloudTablet::exceed_version_limit(int32_t limit) { return _approximate_num_rowsets.load(std::memory_order_relaxed) > limit; } -const std::string& CloudTablet::tablet_path() const { - return get_rowset_with_max_version()->tablet_path(); +std::string CloudTablet::tablet_path() const { + return ""; } Status CloudTablet::capture_consistent_rowsets_unlocked( diff --git a/be/src/cloud/cloud_tablet.h b/be/src/cloud/cloud_tablet.h index f5a767a2ea78d4..a08526c5ff65ae 100644 --- a/be/src/cloud/cloud_tablet.h +++ b/be/src/cloud/cloud_tablet.h @@ -70,7 +70,7 @@ class CloudTablet final : public BaseTablet { return _approximate_data_size.load(std::memory_order_relaxed); } - const std::string& tablet_path() const override; + std::string tablet_path() const override; // clang-format off int64_t fetch_add_approximate_num_rowsets (int64_t x) { return _approximate_num_rowsets .fetch_add(x, std::memory_order_relaxed); } diff --git a/be/src/olap/base_tablet.h b/be/src/olap/base_tablet.h index c4ed7959f46c93..2adc963bd88e47 100644 --- a/be/src/olap/base_tablet.h +++ b/be/src/olap/base_tablet.h @@ -103,7 +103,7 @@ class BaseTablet { void set_alter_failed(bool alter_failed) { _alter_failed = alter_failed; } bool is_alter_failed() { return _alter_failed; } - virtual const std::string& tablet_path() const = 0; + virtual std::string tablet_path() const = 0; virtual bool exceed_version_limit(int32_t limit) = 0; diff --git a/be/src/olap/tablet.h b/be/src/olap/tablet.h index a52755c1d04fee..afd44950a4cd4d 100644 --- a/be/src/olap/tablet.h +++ b/be/src/olap/tablet.h @@ -116,7 +116,7 @@ class Tablet final : public BaseTablet { DataDir* data_dir() const { return _data_dir; } int64_t replica_id() const { return _tablet_meta->replica_id(); } - const std::string& tablet_path() const override { return _tablet_path; } + std::string tablet_path() const override { return _tablet_path; } bool set_tablet_schema_into_rowset_meta(); Status init();