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

Re-fetch quota when it makes sense #6930

Closed
kulmann opened this issue May 10, 2022 · 6 comments · Fixed by #7415
Closed

Re-fetch quota when it makes sense #6930

kulmann opened this issue May 10, 2022 · 6 comments · Fixed by #7415
Assignees
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working

Comments

@kulmann
Copy link
Contributor

kulmann commented May 10, 2022

Steps to reproduce

  1. Look at personal quota (user-menu) or project space quota (right sidebar)
  2. Upload or delete files / folders
  3. Repeat step 1

Expected behaviour

The respective quota info should reflect the changes made in (2)

Actual behaviour

Quota info remains unchanged

Possible solutions

  • we could re-fetch the respective quota after IO batches of operations are done
  • we could use the client-side available filesize info to re-calculate the quota info instead of re-fetcing the quota to save network requests
@pascalwengerter
Copy link
Contributor

pascalwengerter commented May 13, 2022

Tried doing some investigation. Some finds

  • we do fetch the quota upon completed upload on - however, this only works in oC10 for me, oCIS seems to always return the same (relative) quota; it also sometimes sends a lot of requests to re-fetch user/quota information
  • we should probably fetch it after emptying the (personal) trashbin or deleting resources there. Other web client interactions than uploading and (ultimately) deleting resources don't have implications on the quota, amirite?

@tbsbdr
Copy link

tbsbdr commented Jul 27, 2022

decision: refetch quota after upload has finished.

@AlexAndBear
Copy link
Contributor

@tbsbdr whats about deleting files?

@AlexAndBear AlexAndBear self-assigned this Aug 8, 2022
@tbsbdr
Copy link

tbsbdr commented Aug 8, 2022

iirc @kulmann and I discussed that the problem is, that we don't want to generate too many requests just to have the quota up-to-date.

refetch quota after deletion of a file would be cool, sure but in case of batch-delete we would need some debounce I guess.

So: the quota should get updated after delete-operation only if the costs are low I'd say. whats your opinion, @kulmann ?

@AlexAndBear
Copy link
Contributor

Checked that, the cost is low, as I only make one request after batch delete

@AlexAndBear
Copy link
Contributor

AlexAndBear commented Aug 8, 2022

Relative (that's the percentage view) in ocis gets wrong calculated, see owncloud/ocis#4357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants