Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDeleted files sometimes aren't deleted properly due to timestamp conflict #23151
Comments
LukasReschke
added
bug
app:files_trashbin
labels
Mar 12, 2016
This comment has been minimized.
This comment has been minimized.
Weird duplicate key issue when inserting files into the trashbin. @mirekys did you try deleting these files multiple times in the past ? Maybe something already created the trashbin entries and left them there and now re-deleting the same file fails with this error. @schiesbn |
PVince81
added this to the
9.0.1-current-maintenance milestone
Mar 14, 2016
PVince81
added
the
sev3-medium
label
Mar 14, 2016
This comment has been minimized.
This comment has been minimized.
There are about 24 entries with the same id(filename) in the oc_files_trash table for that user. However,
And there really is only one entry for that name in the filecache:
More strangely, the second DELETE (from apache log above) failed partially without any further trace in logs, leaving the following in filecache.
No sign of that particular file in the oc_files_trash:
And the file does no longer exist on the filesystem. I have tried to delete it on the web, |
This comment has been minimized.
This comment has been minimized.
I have managed to reproduce the first problem:
|
This comment has been minimized.
This comment has been minimized.
Ahhhh, right, because they both get the same timestamp... |
cmonteroluque
modified the milestones:
9.0.2-current-maintenance,
9.0.1,
9.0.3-next-maintenance
Apr 8, 2016
This comment has been minimized.
This comment has been minimized.
Any news on this? Even if it affects an already deleted files, there still is some potential for data loss. Maybe something more unique like etag+timestamp should be used in a filename. Another way i can think of, is to put deleted files into a directory tree. |
This comment has been minimized.
This comment has been minimized.
Discussed this with @schiesbn and @nickvergessen a while ago, I don't remember the outcome though. A simple way would be to add either the file id or the etag like you said into the file name. |
PVince81
modified the milestones:
9.0.4-next-maintenance,
9.0.3-current-maintenance
Jun 2, 2016
PVince81
modified the milestones:
9.0.5,
9.0.4
Jul 18, 2016
PVince81
modified the milestones:
9.0.6,
9.0.5
Sep 21, 2016
PVince81
modified the milestones:
9.0.7,
9.0.6
Oct 20, 2016
PVince81
modified the milestones:
9.2,
9.0.7
Nov 30, 2016
PVince81
modified the milestones:
backlog,
10.0
Dec 8, 2016
esprit-libre
referenced this issue
Mar 8, 2017
Closed
occ files:scan => Exception while scanning #3763
mrow4a
self-assigned this
Aug 15, 2017
ownclouders
added
the
status/STALE
label
Jan 5, 2018
This comment has been minimized.
This comment has been minimized.
ownclouders
commented
Jan 13, 2018
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
mirekys commentedMar 11, 2016
•
edited by DeepDiver1975
Steps to reproduce
...
// this is just a hypothesis from observation, didn't manage to reproduce it by myself yet //
Expected behaviour
Deleted files may not be presented by the server on its original path as regular files
and should be accessible through files_trashbin.
Actual behaviour
Deleted file is unlinked on underlying storage (on path 'data/userid/files/dir1/file.txt'), but is still presented together with other regular files on its original path on web, and in response to PROPFIND. Download fails with 404 (web) or 503 - Could not open file (sync client). Synchronization stops on that error.
Server configuration
Operating system:
RHEL 6.4
Web server:
Apache/2.4.12
Database:
PostgreSQL 9.2
PHP version:
5.6.5
ownCloud version:
8.2.2
Updated from an older ownCloud or fresh install:
from 8.1.5
Where did you install ownCloud from:
https://owncloud.org/changelog/
List of activated apps:
The content of config/config.php:
// unrelated items omitted //
'dbtype' => 'pgsql',
'version' => '8.2.2.2',
'installed' => true,
'forcessl' => true,
'maintenance' => false,
'enable_previews' => false,
'singleuser' => false,
'share_folder' => '/Shared',
'trashbin_retention_obligation' => 'auto',
'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
'allow_user_to_change_display_name' => true,
'asset-pipeline.enabled' => true,
'session_keepalive' => true,
Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no
Client configuration
Seen on:
Logs
Web server error log
ownCloud log (data/owncloud.log)