Skip to content

Commit

Permalink
fix leader cache (#5539)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisChu authored and Sophie-Xie committed May 12, 2023
1 parent 5a283c6 commit 12bacc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clients/meta/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,6 @@ bool MetaClient::loadData() {
return *hostItem.hostAddr_ref();
});

loadLeader(hostItems, spaceIndexByName_);

decltype(localCache_) oldCache;
{
oldCache = std::move(localCache_);
Expand All @@ -386,6 +384,8 @@ bool MetaClient::loadData() {
storageHosts_ = std::move(hosts);
}

loadLeader(hostItems, spaceIndexByName_);

localDataLastUpdateTime_.store(metadLastUpdateTime_.load());
auto newMetaData = new MetaData();

Expand Down

0 comments on commit 12bacc5

Please sign in to comment.