Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trashbin throws UniqueConstraintViolationException when restoring files #135

Closed
LukasReschke opened this issue Jun 16, 2016 · 3 comments · Fixed by #12371
Closed

Trashbin throws UniqueConstraintViolationException when restoring files #135

LukasReschke opened this issue Jun 16, 2016 · 3 comments · Fixed by #12371

Comments

@LukasReschke
Copy link
Member

I happen to see the following error on cloud.nextcloud.com when restoring files from time to time. Files get not restored then.

The files to restore are belonging to another user and restoring with the owner works… This happened 3 times this week now.

@schiessle Any idea? Let me know if you need more info on that.

{
    "reqId": "xVm0XaDW+sREHczzpUsN",
    "remoteAddr": "91.65.223.194",
    "app": "index",
    "message": "Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\UniqueConstraintViolationException\",\"Message\":\"An exception occurred while executing 'UPDATE `oc_filecache` SET `storage` =  ?, `path` = ?, `path_hash` = ?, `name` = ?, `parent` =? WHERE `fileid` = ?' with params [\\\"3\\\", \\\"Launch marketing\\\\\\\/June 14\\\\\\\/press email\\\\\\\/press email.txt\\\", \\\"3d58c6b9de24438460087af9df48d184\\\", \\\"press email.txt\\\", -1, 3221]:\\n\\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-3d58c6b9de24438460087af9df48d184' for key 'fs_storage_path_hash'\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(116): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(836): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'UPDATE `oc_file...', Array)\\n#2 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/db\\\/connection.php(184): Doctrine\\\\DBAL\\\\Connection->executeQuery('UPDATE `oc_file...', Array, Array, NULL)\\n#3 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/cache\\\/cache.php(527): OC\\\\DB\\\\Connection->executeQuery('UPDATE `oc_file...', Array)\\n#4 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/cache\\\/wrapper\\\/cachewrapper.php(183): OC\\\\Files\\\\Cache\\\\Cache->moveFromCache(Object(OC\\\\Files\\\\Cache\\\\HomeCache), 'files_trashbin\\\/...', 'Launch marketin...')\\n#5 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/cache\\\/updater.php(186): OC\\\\Files\\\\Cache\\\\Wrapper\\\\CacheWrapper->moveFromCache(Object(OC\\\\Files\\\\Cache\\\\HomeCache), 'files_trashbin\\\/...', 'Launch marketin...')\\n#6 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/view.php(322): OC\\\\Files\\\\Cache\\\\Updater->renameFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files_trashbin\\\/...', 'Launch marketin...')\\n#7 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/view.php(780): OC\\\\Files\\\\View->renameUpdate(Object(OCA\\\\Files_Trashbin\\\\Storage), Object(OCA\\\\Files_Trashbin\\\\Storage), 'files_trashbin\\\/...', 'Launch marketin...')\\n#8 \\\/var\\\/www\\\/html\\\/apps\\\/files_trashbin\\\/lib\\\/trashbin.php(394): OC\\\\Files\\\\View->rename('\\\/files_trashbin...', '\\\/files\\\/Marketin...')\\n#9 \\\/var\\\/www\\\/html\\\/apps\\\/files_trashbin\\\/ajax\\\/undelete.php(72): OCA\\\\Files_Trashbin\\\\Trashbin::restore('\\\/\\\/press email.t...', 'press email.txt', '1465839375')\\n#10 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/route\\\/route.php(154) : runtime-created function(1): require_once('\\\/var\\\/www\\\/html\\\/a...')\\n#11 [internal function]: __lambda_func()\\n#12 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func('\\\\x00lambda_121', Array)\\n#13 \\\/var\\\/www\\\/html\\\/lib\\\/base.php(950): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_tra...')\\n#14 \\\/var\\\/www\\\/html\\\/index.php(39): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":66}",
    "level": 3,
    "time": "2016-06-16T15:22:55+00:00",
    "method": "POST",
    "url": "\/index.php\/apps\/files_trashbin\/ajax\/undelete.php",
    "user": "jos"
}
@williambargent
Copy link
Member

#139 not sure if these are related.

@MorrisJobke
Copy link
Member

Still an issue over here :/ @rullzer @schiessle Mind to look into it?

@MorrisJobke
Copy link
Member

This one was refactored in 15 and is not there anymore -> closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants