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

Very deep folder structure fails to be discovered with occ command. #19309

Closed
SergioBertolinSG opened this issue Sep 23, 2015 · 7 comments
Closed

Comments

@SergioBertolinSG
Copy link
Contributor

SergioBertolinSG commented Sep 23, 2015

Steps to reproduce

  1. Create an structure of 1024 folders of depth inside the files folder of a user, each folder with some characters.
  2. Run files scan manually:
sudo -u www-data ./occ files:scan user0

Expected behaviour

Folders are discovered.

Actual behaviour

MySQL errors.

Server configuration

Operating system:
Ubuntu 14.04

Web server:
Apache

Database:
MySQL

PHP version:
5.5.9

ownCloud version: (see ownCloud admin page)
{"installed":true,"maintenance":false,"version":"8.2.0.6","versionstring":"8.2 beta1","edition":"Enterprise"}

Updated from an older ownCloud or fresh install:
Fresh

List of activated apps:
Default in community edition..

The content of config/config.php:


Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption:
No

Output

  [Doctrine\DBAL\Exception\DriverException]                                                                                  
  An exception occurred while executing 'SELECT "fileid", "storage", "path", "parent", "name", "mimetype", "mimepart", "siz  
  e", "mtime",                                                                                                               
                           "storage_mtime", "encrypted", "etag", "permissions"                                                               
                    FROM "filecache" WHERE "parent" = ? ORDER BY "name" ASC' with params [1605]:                                          
  SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of trans  
  action block                                                                                                               






  [Doctrine\DBAL\Driver\PDOException]                                                                                        
  SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of trans  
  action block                                                                                                               






  [PDOException]                                                                                                             
  SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of trans  
  action block                                                                                                               



files:scan [-p|--path="..."] [-q|--quiet] [--all] [user_id1] ... [user_idN]


PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block' in /opt/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91
Stack trace:
#0 /opt/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(91): PDOStatement->execute(Array)
#1 /opt/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(989): Doctrine\DBAL\Driver\PDOStatement->execute(Array)
#2 /opt/owncloud/lib/private/db/connection.php(203): Doctrine\DBAL\Connection->executeUpdate('INSERT INTO "fi...', Array, Array)
#3 /opt/owncloud/lib/private/db/adapter.php(93): OC\DB\Connection->executeUpdate('INSERT INTO `*P...', Array)
#4 /opt/owncloud/lib/private/db/connection.php(242): OC\DB\Adapter->insertIfNotExist('*PREFIX*file_lo...', Array, Array)
#5 /opt/owncloud/lib/private/lock/dblockingprovider.php(63): OC\DB\Connection->insertIfNotExist('*PREFIX*file_lo...', Array, Array)
#6 /op in /opt/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php on line 91
@SergioBertolinSG
Copy link
Contributor Author

@icewind1991 what is the folder depth limit that we can expect to use when discovering using files:scan?

@PVince81
Copy link
Contributor

@SergioBertolinSG please note that the "path" field in the database has a maximum length of 4000 characters. This means that if the full path gets longer than that, some problems might appear. Are your generated paths longer than this ?

@DeepDiver1975 @icewind1991 didn't we have a check somewhere to prevent this to happen ?

@SergioBertolinSG
Copy link
Contributor Author

Yes, definitely more than 4000. (around 11263 chars the longest)

@PVince81
Copy link
Contributor

Ok so this issue is about the limit check that doesn't kick in early enough

@PVince81 PVince81 added this to the 9.1-next milestone Mar 1, 2016
@PVince81 PVince81 modified the milestones: 9.1-current, 9.1.1-next-maintenance Jun 30, 2016
@PVince81 PVince81 modified the milestones: 9.1.2, 9.1.1 Sep 21, 2016
@PVince81 PVince81 modified the milestones: 9.1.3, 9.1.2 Oct 20, 2016
@PVince81 PVince81 modified the milestones: 9.2, 9.1.3 Nov 30, 2016
@PVince81 PVince81 modified the milestones: backlog, 10.0 Apr 6, 2017
@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants