-
Notifications
You must be signed in to change notification settings - Fork 6
Check if file exist in allocation before deletion #159
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
base: staging
Are you sure you want to change the base?
Conversation
| for _, object := range objects { | ||
| remotePath := filepath.Join(basePath, object.ObjectName) | ||
| _, err := getSingleRegularRef(zob.alloc, filepath.Clean(remotePath)) | ||
| if err != nil { |
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.
Why are we fetching the ref? If its not there it will be ignored by delete operation.
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.
@Hitenjain14 minio raised an error here when the requested file didnot exist. The deleteworker expected to work for that case you mentioned might have ignored as minio raised issue stating invalid remote ref.
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.
Please check where is the error coming from, is it DoMultiOperation for delete if yes then we need to fix it there rather than adding a check here
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 above changes will impact the performance of delete, getting a singular file ref can take upto 50ms and we do this for every object.
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.
ok
Description
There were issues where mismatched file were send for delete request. So This checks if file actually exist in allocation.
Motivation and Context
This had a issue for zs3server test cases for warp mixed command
How to test this PR?
using ../warp mixed command
Types of changes
Checklist:
commit-idorPR #here)