owncloud / owncloud/ocis

[QA] deleting a folder while its contents is beeing deleted causes weird errors

Open
#10,221 0 comments 1 reaction 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 2h
Merged PRs (30d)
106

Description

## Describe the bug
Seen with ocis 6.5.0 web 10.3.0

Deleting the parent folder, while delete operations for content is ongoing leads to error messages with 'Details: undefined' and shows only some of the deleted files in the trashbin.

## Steps to reproduce
1. Alice uploads a folder (named "500") with 500 files to her personal space. E.g. [500_files.zip](https://github.com/user-attachments/files/17228551/500_files.zip)
2. Alice enters the folder "500", uses the cogwheel menu to change 'items per page' to 500.
3. Alice selects all 500 files by clicking the checkbox next to 'Name'.
4. The next four steps need to be done very quickly:
- click 'Delete' to start the delete process for all selected files. While the deletes are still ongoing ...
- click 'Personal' in the top breadcrumb to navigate to toplevel,
- click the checkbox next to folder "500"
- click 'Delete'
5. A notification appears: (!) "500" was moved to trash bin. OK
![image](https://github.com/user-attachments/assets/e0504b21-55bd-40c2-a505-4d11aefce36a)

----

6. More notifications appear including errors: BAD
![image](https://github.com/user-attachments/assets/98e20995-4091-4718-8b23-f96035f386e8)

----
7. All of the error messages just say "Failed to delete ..." and contain only Details: "X-Requiest-Id: undefined" BAD
![image](https://github.com/user-attachments/assets/24cc14e6-1e13-4211-a90a-83fbeb0c631e)

----
8. Using the x to click away notifications is tedious. There are several hundreds of them. (Reloading the page clears them all) BAD
9. Alice inspects the trash bin by clicking on 'Deleted files" in the left sidebar.
![image](https://github.com/user-attachments/assets/7c203c6b-2b1d-4b9c-8069-1326df63984b)
![image](https://github.com/user-attachments/assets/ee447902-ea57-416e-923c-713b5842991c)

----
10. The folder "500" is seen in the trash bin. OK - 181 files are seen in the trash bin. OKish
11. Users may panic, as they would expect either 500 files or the "500" folder, not a mix. BAD
12. When restoing the "500" folder, we see that 319 files are in there. So nothing was lost. OK

## Expected behavior
* All 500 deleted files should be visible in the trash bin, as this delete was triggered before the folder was deleted.

@nicholas-wilson-au is that what you saw too?

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. First reproduce the concurrent deletion sequence in the issue using ocis 6.5.0 and web 10.3.0, then trace the delete operation and trash-bin handling for the resulting undefined request IDs. Done means the notifications contain useful details and the trash bin consistently shows all 500 deleted files.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.