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

Deleted blobs are returned in ListBlobsFlatSegment if the Versions is been requested as well #276

Open
myfoxtail opened this issue May 19, 2021 · 1 comment

Comments

@myfoxtail
Copy link

myfoxtail commented May 19, 2021

Which version of the SDK was used?

v0.13.0
https://pkg.go.dev/github.com/Azure/[email protected]/azblob

Which platform are you using? (ex: Windows, Linux, Debian)

Linux, Mac

What problem was encountered?

Using ListBlobsFlatSegment function with the following parameters returns blobs that have been deleted.

listBlob, err := templateContainerURL.ListBlobsFlatSegment(
  ctx, 
  marker,
  azblob.ListBlobsSegmentOptions{
    Details: azblob.BlobListingDetails{
      Copy: false, 
      Metadata: false, 
      Snapshots: false,
      UncommittedBlobs: false, 
      Deleted: false, 
      Versions: true}}
)

Note, that container has soft-delete option enabled. If this is the reason, then is there any way to get only those blobs that are not marked as deleted?

How can we reproduce the problem in the simplest way?

Create a container, create blobs in the container. Delete some blobs. Call that function. Should see all the blobs.

Have you found a mitigation/solution?

No.

@myfoxtail myfoxtail changed the title Deleted blobs are returned in ListBlobsFlatSegment even if Deleted parameter is false Deleted blobs are returned in ListBlobsFlatSegment if the Version is been requested as well May 19, 2021
@myfoxtail myfoxtail changed the title Deleted blobs are returned in ListBlobsFlatSegment if the Version is been requested as well Deleted blobs are returned in ListBlobsFlatSegment if the Versions is been requested as well May 19, 2021
@siminsavani-msft
Copy link
Contributor

Hi @myfoxtail ! Setting Deleted: false should prevent blobs that are soft-deleted from showing up in the list. I tried to repro it and it works as intended. Could you try it out again and maybe provide what steps you are doing before listing the blobs?

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

No branches or pull requests

2 participants