nextcloud / nextcloud/files_lock

Can't unlock file with TTL = 0

Open
#198 1 comment 3 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.