From 2f1ea74da8d4000ff9419161c671e7bbcf82a169 Mon Sep 17 00:00:00 2001 From: pengweisong <90180021+pengweisong@users.noreply.github.com> Date: Sat, 2 Apr 2022 14:19:09 +0800 Subject: [PATCH] chage to emplace --- src/kvstore/Common.h | 2 +- src/kvstore/NebulaStore.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kvstore/Common.h b/src/kvstore/Common.h index 696edf5acae..c97e6c878a7 100644 --- a/src/kvstore/Common.h +++ b/src/kvstore/Common.h @@ -183,7 +183,7 @@ struct Peers { return time::WallClock::fastNowInSec() - createdTime > FLAGS_balance_expired_sesc; } - void setCreatedTime(int time) { + void setCreatedTime(int64_t time) { createdTime = time; } diff --git a/src/kvstore/NebulaStore.cpp b/src/kvstore/NebulaStore.cpp index efb06e5fa5f..5906f4b4dbb 100644 --- a/src/kvstore/NebulaStore.cpp +++ b/src/kvstore/NebulaStore.cpp @@ -122,7 +122,7 @@ void NebulaStore::loadPartFromDataPath() { auto spacePart = std::make_pair(spaceId, partId); if (partSet.find(spacePart) == partSet.end()) { - partSet.insert(std::make_pair(spaceId, partId)); + partSet.emplace(std::make_pair(spaceId, partId)); // join the balancing peers with meta peers auto metaStatus = options_.partMan_->partMeta(spaceId, partId);