find data/user1 -iname \*.v\*
update oc_jobs set last_run=0
Some version expired
No versions expired.
The reason is because the expire() method calls getUidAndFilename and the external storage has no owner, so it bails out with NoUserException without doing any expiration.
According to @schiesbn, versions on system-wide ext storage are always specific to the current user viewing the folder. So the correct logic would be to make it fallback to the user that was specified in the expire job.
CC @nickvergessen @VicDeo
Looks like the code in getUidAndFilename is very old, it assumes that the owner can be another user. This is obsolete because since the introduction of expire background jobs, we only ever expire for the user specified in the expire job. For shared folders, the expire job is only created for owners even when a recipient edited a file.
This means that as part of this fix we can get rid of getOwner() and always use the expire job user.
It would also fix the case with external storage where we need to use that user too.
@VicDeo can you take care of this ?
Fix is here #26601