IQSS / IQSS/dataverse

Storage Quota for a Collection Not Updated when Deleting a Dataset

Open
#11,543 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the quota sequence using the collection storage-quota API, then inspect the deletion flow associated with dataset.xhtml and editdatafiles.xhtml. Confirm that deleting a dataset containing files reduces the collection's reported quota usage, matching the behavior already seen when deleting files within a dataset.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.