-
Notifications
You must be signed in to change notification settings - Fork 525
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: fix trash will delete file data more than once #2938
Conversation
cicheck |
} | ||
|
||
void TrashImpl::ScanTrash() { | ||
LockGuard lgScan(scanMutex_); | ||
// only scan on leader | ||
if (copysetNode_ == nullptr || !copysetNode_->IsLeaderTerm()) { |
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 following loop also needs to be interrupted when the node is not the leader.
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.
fixed
|
||
DeleteInodeResponse response; | ||
DeleteInodeClosure done; | ||
auto DeleteInodeOp = new copyset::DeleteInodeOperator( |
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.
Where is this op implemented?
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.
This operation originally existed and was used to delete the remaining inodes after the creation process failed.
class DeleteInodeOperator : public MetaOperator { |
curvefs/src/metaserver/trash.cpp
Outdated
<< ", inodeId = " << it->inodeId; | ||
LOG(INFO) << "Trash delete inode, fsId = " << fsId_ | ||
<< ", partitionId = " << partitionId_ | ||
<< ", inodeId = " << it->inodeId; | ||
it = temp.erase(it); |
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.
How to remove trash items on the follower side
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.
fixed, it will delete in InodeManagger::DeleteInode
Signed-off-by: wanghai01 <seanhaizi@163.com>
cicheck |
What problem does this PR solve?
#2774
Issue Number: #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List