Skip to content

Conversation

@pewssh
Copy link

@pewssh pewssh commented Sep 22, 2024

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

  • [+] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

for _, object := range objects {
remotePath := filepath.Join(basePath, object.ObjectName)
_, err := getSingleRegularRef(zob.alloc, filepath.Clean(remotePath))
if err != nil {
Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants