Skip to content

Commit fabd3b5

Browse files
committed
fix clang tidy
Signed-off-by: edwinhzhang <[email protected]>
1 parent 5fff4d2 commit fabd3b5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

be/src/service/staros_worker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ absl::StatusOr<std::shared_ptr<fslib::FileSystem>> StarOSWorker::build_filesyste
285285

286286
absl::StatusOr<std::pair<std::shared_ptr<std::string>, std::shared_ptr<fslib::FileSystem>>>
287287
StarOSWorker::build_filesystem_from_shard_info(const ShardInfo& info, const Configuration& conf,
288-
std::shared_ptr<std::string> existing_fs_cache_key) {
288+
const std::shared_ptr<std::string>& existing_fs_cache_key) {
289289
auto localconf = build_conf_from_shard_info(info);
290290
if (!localconf.ok()) {
291291
return localconf.status();
@@ -295,7 +295,7 @@ StarOSWorker::build_filesystem_from_shard_info(const ShardInfo& info, const Conf
295295
return scheme.status();
296296
}
297297

298-
return new_shared_filesystem(info.id, *scheme, *localconf, std::move(existing_fs_cache_key));
298+
return new_shared_filesystem(info.id, *scheme, *localconf, existing_fs_cache_key);
299299
}
300300

301301
bool StarOSWorker::need_enable_cache(const ShardInfo& info) {
@@ -338,7 +338,7 @@ absl::StatusOr<fslib::Configuration> StarOSWorker::build_conf_from_shard_info(co
338338

339339
absl::StatusOr<std::pair<std::shared_ptr<std::string>, std::shared_ptr<fslib::FileSystem>>>
340340
StarOSWorker::new_shared_filesystem(ShardId shard_id, std::string_view scheme, const Configuration& conf,
341-
std::shared_ptr<std::string> existing_fs_cache_key) {
341+
const std::shared_ptr<std::string>& existing_fs_cache_key) {
342342
std::string cache_key = get_cache_key(scheme, conf);
343343

344344
// Lookup LRU cache

be/src/service/staros_worker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ class StarOSWorker : public staros::starlet::Worker {
124124
absl::StatusOr<std::shared_ptr<FileSystem>> build_filesystem_on_demand(ShardId id, const Configuration& conf);
125125
absl::StatusOr<std::pair<std::shared_ptr<std::string>, std::shared_ptr<FileSystem>>>
126126
build_filesystem_from_shard_info(const ShardInfo& info, const Configuration& conf,
127-
std::shared_ptr<std::string> existing_fs_cache_key = nullptr);
127+
const std::shared_ptr<std::string>& existing_fs_cache_key = nullptr);
128128
absl::StatusOr<std::pair<std::shared_ptr<std::string>, std::shared_ptr<FileSystem>>> new_shared_filesystem(
129129
ShardId shard_id, std::string_view scheme, const Configuration& conf,
130-
std::shared_ptr<std::string> existing_fs_cache_key = nullptr);
130+
const std::shared_ptr<std::string>& existing_fs_cache_key = nullptr);
131131
absl::Status invalidate_fs(const ShardInfo& shard);
132132

133133
std::shared_ptr<std::string> insert_fs_cache(const std::string& key, const std::shared_ptr<FileSystem>& fs,

0 commit comments

Comments
 (0)