Skip to content

Storage Quota for a Collection Not Updated when Deleting a Dataset #11543

@wshahn

Description

@wshahn

What steps does it take to reproduce the issue?
This is my entire process. Please note that quota reallocation seems to work well when deleting files within a dataset, but is not reallocated when deleting a dataset. See specifically steps 10-13 below.

  1. Create a collection
  2. Then, create a dataset (Image 001)
  3. I set the storage quota for the collection to 10MB:
$ curl -X POST -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/dataverses/$ID/storage/quota/$SIZE_IN_BYTES"
{"status":"OK","data":{"message":"Storage quota successfully set for the collection"}}
$ curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/dataverses/$ID/storage/quota"
{"status":"OK","data":{"message":"Total quota allocation for this collection: 10,485,760 bytes"}}
  1. Before uploading any files, a 10MB storage quota is reflected in the UI (Image 002)
  2. Big text file successfully uploaded at 3.9MB (Image 003)
  3. The quota has successfully updated with this upload (Image 004)
  4. Let's delete big.txt from the first dataset (Image 005)
  5. Quota is reallocated (Image 006)
  6. Re-uploaded big.txt to the same dataset
  7. Created a second dataset also with big.txt (Image 007)
  8. The quota has updated to 2.3MB (Image 008)
  9. Finally, let's delete the second dataset (Image 009)
  10. We see that the quota remains at 2.3MB (Image 010)
  • When does this issue occur?
    When using collection quotas and deleting a dataset.

  • Which page(s) does it occurs on?
    dataset.xhtml and editdatafiles.xhtml.

  • What happens?
    The quota size is not updated correctly when deleting a dataset taking up space in the quota.

  • To whom does it occur (all users, curators, superusers)?
    All users (I performed this test as a superuser).

  • What did you expect to happen?
    I expected the quota to be reallocated upon deleting a dataset.

Which version of Dataverse are you using?
v6.5

Any related open or closed issues to this bug report?
None.

Screenshots:
Image 001
Image

Image 002
Image

Image 003
Image

Image 004
Image

Image 005
Image

Image 006
Image

Image 007
Image

Image 008
Image

Image 009
Image

Image 010
Image

Are you thinking about creating a pull request for this issue?
As of now, no.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions