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

Overwriting a file in the space within the allowed quota does not work #2829

Closed
ScharfViktor opened this issue Nov 29, 2021 · 6 comments
Closed
Assignees
Labels
Estimation:XS(1) OCIS-Fastlane Planned outside of the sprint Priority:p2-high Escalation, on top of current planning, release blocker Topic:good-first-issue Type:Bug

Comments

@ScharfViktor
Copy link
Contributor

Describe the bug

Api test for case: https://github.com/owncloud/ocis/tree/apiTestQuota

Steps to reproduce

Steps to reproduce the behavior:

  1. Create Space with quota 15 Bytes
  2. Upload file 7 bytes to space: curl -k https://localhost:9200/dav/spaces/{space_id}/test.txt -X PUT -d "7 bytes" -v -u admin:admin
  3. Overwrite file "test.txt" 10 bytes: curl -k https://localhost:9200/dav/spaces/{space_id}/test.txt -X PUT -d "0010 bytes" -v -u admin:admin

Expected behavior

the total quota is not exceeded by the new version of the file. The new file should be saved.
expect: 204. used quota: 10. remaining quota: 5

Actual behavior

error 507. File "test.txt" 10 Bytes does not overwrite

OCIS_VERSION=1.15.0

Additional context

Add any other context about the problem here.

@ScharfViktor ScharfViktor added OCIS-Fastlane Planned outside of the sprint Type:Bug labels Nov 29, 2021
@micbar micbar added the Priority:p2-high Escalation, on top of current planning, release blocker label Dec 14, 2021
@C0rby
Copy link
Contributor

C0rby commented May 11, 2022

@micbar is that really the expected behavior?
When overwriting a file we are creating a new version. Do versions count into the quota?

@micbar
Copy link
Contributor

micbar commented May 11, 2022

@C0rby Versions and trashbin do not count into the quota. It should already be implemented like that.

@C0rby C0rby self-assigned this May 11, 2022
@C0rby
Copy link
Contributor

C0rby commented May 11, 2022

Ok, follow up question: In case the quota is exceeded let's say quota is 15 bytes and is 100% utilized, and the user overwrites a file with a bigger file, do we allow that? This means the user would effectively use more than 100% of their quota.

Storage (15 bytes quota):

  • File1 (5 bytes)
  • File2 (10 bytes)

Now overwrite File1 with a file of size 30 bytes.

Storage (15 bytes quota):

  • File1 (30 bytes)
  • File2 (10 bytes)

I'm asking because I already have a fix for this issue but if we still need to stay within the quota then I have to change the quota check some more.

@micbar
Copy link
Contributor

micbar commented May 11, 2022

Ok, follow up question: In case the quota is exceeded let's say quota is 15 bytes and is 100% utilized, and the user overwrites a file with a bigger file, do we allow that? This means the user would effectively use more than 100% of their quota.

No, we do not allow exceeding the quota.

@C0rby
Copy link
Contributor

C0rby commented May 13, 2022

A fix has been implemented but the ticket is still open because Reva hasn't been updated in oCIS yet.

@kobergj
Copy link
Collaborator

kobergj commented May 16, 2022

Fix has landed in ocis. Closing this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Estimation:XS(1) OCIS-Fastlane Planned outside of the sprint Priority:p2-high Escalation, on top of current planning, release blocker Topic:good-first-issue Type:Bug
Projects
Archived in project
Development

No branches or pull requests

5 participants