-
Notifications
You must be signed in to change notification settings - Fork 526
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 mds heartbeat doesn't delete copyset creating. #1011
Conversation
recheck |
curvefs/src/mds/topology/topology.h
Outdated
@@ -445,6 +451,8 @@ class TopologyImpl : public Topology { | |||
|
|||
std::string GetHostNameAndPortById(MetaServerIdType msId) override; | |||
|
|||
bool IsCopysetCreating(const CopySetKey &key) override; |
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.
declare it as const member functions
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.
declare it as const member functions
fixed.
|
||
bool TopologyImpl::IsCopysetCreating(const CopySetKey &key) { | ||
ReadLockGuard rlockCopySetCreating(copySetCreatingMutex_); | ||
return copySetCreating_.find(key) == copySetCreating_.end() ? false : true; |
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.
return copysetCreating_.find(key) != copysetCreating_.end();
// or
return coypsetCreating_.count(key) != 0;
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.
return copysetCreating_.find(key) != copysetCreating_.end(); // or return coypsetCreating_.count(key) != 0;
fixed
2d87142
to
d59b80e
Compare
The empty conf will send to metaserver to delete copysets which don't exist in mds, but when the copyset just created in metaserver and have not add to topology, the metaserver heartbeat will contain these copysets' infomation.
d59b80e
to
6348413
Compare
topology_->RemoveCopySetCreating(CopySetKey(poolId, id)); | ||
} | ||
} | ||
|
||
TopoStatusCode TopologyManager::CreateCopyset() { |
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.
Does CreateCopyset have concurrency?
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.
Does CreateCopyset have concurrency?
Concurrency occurs in extreme cases, but the copysets' id must be different.
curvefs mds heartbeat doesn't delete copyset creating.
The empty conf will send to metaserver to delete copysets which don't exist in mds, but when the copyset just created in metaserver and have not add to topology, the metaserver heartbeat will contain these copysets' infomation.
What problem does this PR solve?
Issue Number: close #xxx
#999
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List