prevent file deletion due to concurrency issue
Description
- Fix file deletion happening due to concurrency issue.
- Force Periodic scan to only start if no sync is already running or pending
- prevent new Sync to start when periodic scan is running
Technical details
Triggering case:
Given a file F1 is being uploaded
When eDrive start to check remote content (for periodic scan)
Then F1 is not fully uploaded yet
Then F1 is not listed as remote content
When F1 is uploaded
Then DB is updated
When eDrive list content from Database
Then it get data about uploaded F1 while F1 is still not listed in remote content
Then F1 is considered as being remotly removed
Then eDrive generate a local deletion request.
Tests
- https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/175
- https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/150
- https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/176
- https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/177
Issues
https://gitlab.e.foundation/e/os/backlog/-/issues/732#note_334524
10 commandments of code reviews
Edited by Vincent Bourgmayer