Step to reproduce :
- Set your quota to 500MB
- Upload a file of 100MB
- Copy/Paste this file 3 times (your used quota should be 400MB)
- Select the 4 files, and click Copy
- Paste this set of files
Result : Quota exceed
Expected: One more files to be copied then other copy must be aborted
This happens because QuotaSyncListenerChecker#processDocumentCreated check file by file the remaining quota and trigger asynchronously event to update the quota size. The idea is to use a cache to store a temporary quota that is updated synchronously.