nextcloud / nextcloud/files_lock
Can't unlock file with TTL = 0
Open
Nobody has claimed this yet.
bug
needs info
- Dominant language
- JavaScript
- Stars
- 39
- Forks
- 10
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 48
Description
Hi
We have different files stored in oc_files_lock table with this pattern :
| id | user_id | file_id | token | creation | type | scope | ttl | owner |
|---|---|---|---|---|---|---|---|---|
| 1876 | one@ccount | 2042608 | files_lock/965f5b0d-de31-4b57-9b89-68d697120853 | 1695049796 | 0 | 0 | 0 |
Looks permanent and can't be removed/cleaned with occ cli :
/occ files:lock 2042608 --unlock
unlocking File #2042608
In FileService.php line 73:
[OCP\Files\NotFoundException]
files:lock [--output [OUTPUT]] [-u|--unlock] [--uninstall] [-s|--status] [--] [<file_id> [<user_id>]]
Is it possible to clean them ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the files:lock command and the failure at FileService.php line 73, using the reported file ID and TTL=0 row as the reproduction case. Determine why --unlock cannot find the lock, then verify that the command can clean the row without raising OCP\Files\NotFoundException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100