server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Don't cache quota when queried in web UI

Open PVince81 opened this issue 1 year ago • 1 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

Quota in web UI only updates after a delay.

From my understanding the purpose of the quota cache is only to save performance with repeated PROPFINDs, not when queried for display.

  • idea 1: only use the cached quota value for PROPFINDs
  • idea 2: invalidate the quota cache as soon as size propagation happens (ex: through upload operations)

Steps to reproduce

  1. Setup a user with a quota of 5 GB
  2. Login as that user
  3. Upload a bunch of files
  4. Refresh the page
  5. Look at the used space at the bottom left

Expected behavior

Used space must adjust itself immediately.

Installation method

No response

Operating system

No response

PHP engine version

No response

Web server

No response

Database engine version

No response

Is this bug present after an update or on a fresh install?

No response

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • [ ] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

No response

List of activated Apps

N/A

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

Observed on master and stable25, pre 25.0.2 RC1

PVince81 avatar Nov 25 '22 08:11 PVince81

The quota cache must also be invalidated immediately if the default or per-user limit is changed via the users page in the admin web interface (nextcloud.example.com/settings/users). Currently, it just makes you think that the change in quota limit was not applied, especially since reloading the page will show the old value again (and there is no hint explaining that it just takes a few minutes).

EDIT: Related issue: https://github.com/nextcloud/server/issues/34422:

https://github.com/nextcloud/server/issues/34422#issuecomment-1268089690: The problem of changed quota's not being seen for a while is because in the public static function getStorageInfo there is a caching call to "ICacheFactory".. when I turn that off, That problem is gone.. is there something not being updated to that cache when the quota is changed?

https://github.com/nextcloud/server/issues/34422#issuecomment-1281930365: If memory serves me well,, I do think that the wrong/old setting is indeed gone after say 5 minutes. But that does keep the question valid, why isn't the cache updated upon altering the quota?

eltos avatar Jan 15 '23 11:01 eltos

We update it now based on upload or other events (28+)

skjnldsv avatar Aug 01 '24 05:08 skjnldsv