Check if file exist in allocation before deletion#159
Open
pewssh wants to merge 4 commits into0chain:stagingfrom
Open
Check if file exist in allocation before deletion#159pewssh wants to merge 4 commits into0chain:stagingfrom
pewssh wants to merge 4 commits into0chain:stagingfrom
Conversation
dabasov
suggested changes
Sep 23, 2024
Hitenjain14
reviewed
Sep 24, 2024
| for _, object := range objects { | ||
| remotePath := filepath.Join(basePath, object.ObjectName) | ||
| _, err := getSingleRegularRef(zob.alloc, filepath.Clean(remotePath)) | ||
| if err != nil { |
Contributor
There was a problem hiding this comment.
Why are we fetching the ref? If its not there it will be ignored by delete operation.
Author
There was a problem hiding this comment.
@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.
Contributor
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)