-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curvefs/metaserver: fix trash bugs #2948
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
#include <glog/logging.h> | ||
#include <sys/types.h> | ||
|
||
#include <bitset> | ||
#include <memory> | ||
#include <thread> // NOLINT | ||
#include <unordered_map> | ||
|
@@ -60,6 +61,7 @@ using KVStorage = ::curvefs::metaserver::storage::KVStorage; | |
using Key4S3ChunkInfoList = ::curvefs::metaserver::storage::Key4S3ChunkInfoList; | ||
|
||
using ::curvefs::metaserver::storage::MemoryStorage; | ||
using ::curvefs::metaserver::storage::NameGenerator; | ||
using ::curvefs::metaserver::storage::RocksDBStorage; | ||
using ::curvefs::metaserver::storage::StorageOptions; | ||
|
||
|
@@ -147,6 +149,7 @@ bool MetaStoreImpl::Load(const std::string &pathname) { | |
} | ||
|
||
startCompacts(); | ||
|
||
return true; | ||
} | ||
|
||
|
@@ -933,5 +936,17 @@ bool MetaStoreImpl::InitStorage() { | |
return kvStorage_->Open(); | ||
} | ||
|
||
void MetaStoreImpl::LoadDeletedInodes() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix |
||
VLOG(6) << "load deleted inodes start."; | ||
WriteLockGuard writeLockGuard(rwLock_); | ||
MetaStatusCode status; | ||
for (auto it = partitionMap_.begin(); it != partitionMap_.end(); it++) { | ||
uint32_t partitionId = it->second->GetPartitionId(); | ||
VLOG(6) << "load deleted inodes, partitionId: " << partitionId; | ||
it->second->LoadDeletedInodes(); | ||
} | ||
VLOG(6) << "load deleted inodes end."; | ||
} | ||
|
||
} // namespace metaserver | ||
} // namespace curvefs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parse of key and value can do here and return the final result map<inodeId, dtime> is ok.