Skip to content
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

fix: force-delete should just rename to .trash #12499

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

harshavardhana
Copy link
Member

Description

fix: force-delete should just rename to .trash

Motivation and Context

avoid blocking call for force-delete, instead
treat it lazily and delete it in the background.

How to test this PR?

Nothing special use following code

#!/usr/bin/env python3

def force_delete(self, bucket):
    if bucket is None or bucket == "":
        raise Exception('bucket name is invalid')
    self._execute('DELETE', bucket, "", headers={'x-minio-force-delete': 'true'})

from minio import Minio
setattr(Minio, "force_delete", force_delete)

minioClient = Minio(
        'localhost:9000',
        access_key='minio',
        secret_key='minio123',
        secure=False
        )
minioClient.force_delete('photos')

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

avoid blocking call for force-delete, instead
treat it lazily and delete in background.
@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-zoned.sh ✔️
mint-gateway-nas.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
Deleting image on docker hub
Deleting image locally

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

❤️

@harshavardhana harshavardhana merged commit 3197190 into minio:master Jun 14, 2021
@harshavardhana harshavardhana deleted the fix-force branch June 14, 2021 15:04
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.

None yet

4 participants