Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upload document more than 32000.
#1
Hi

I tested with Ver. 3.2.1 and It's data dir stopped at 31998.
Are ther any way to increase maximum document number?

I edit maxDirID in the setting config. But It desn't work.
Reply
#2
(12-02-2011, 03:25 PM)itsu Wrote: Hi

I tested with Ver. 3.2.1 and It's data dir stopped at 31998.
Are ther any way to increase maximum document number?

I edit maxDirID in the setting config. But It desn't work.

maxDirID has no meaning. I should delete it at some time.
The number of documents is restricted by the number of directories
per directory of your filesystem. ext3 has a limit of 31998 directories.
ext4 allows 64000.

Uwe
Reply
#3
Hi Uwe
Thanks for your reply.
Are ther any way to extend max documents without changing my file system?
Just making different directory?
Reply
#4
(12-05-2011, 10:06 AM)itsu Wrote: Hi Uwe
Thanks for your reply.
Are ther any way to extend max documents without changing my file system?
Just making different directory?

Setting up a second directory doesn't help, because you won't see the documents in the initial directory anymore. I know this is very unsatisfactory, but there is currently no way out. I have to check first how to solve this without breaking to much.

Uwe
Reply
#5
Hi Uwe

Thanks.
I hope you to support more than 31998 in the short term.

>I have to check first how to solve this without breaking to much.
Reply
#6
Hi Uwe

I had to input more than 32000.
So I changed getpath() and getDir() in inc.ClassDocument.php like followings.
This support more than 20000*31998 documents.
but supporting lots of document, I also had to change ViewFolder.php.

// function getPath() { return $this->_document->getID() .'/'. $this->_version . $this->_fileType; }
function getPath() { return $this->_document->getDir() .'/'. $this->_version . $this->_fileType; }


function getDir() { /* {{{ */
if($this->_id > 20000){
$dirid = (int)( $this->_id / 20000 ) + 1;
}else{
$dirid = 1;
}
return $dirid."/".$this->_id."/";
} /* }}} */
Reply
#7
(12-05-2011, 06:47 PM)itsu Wrote: Hi Uwe

I had to input more than 32000.
So I changed getpath() and getDir() in inc.ClassDocument.php like followings.
This support more than 20000*31998 documents.
but supporting lots of document, I also had to change ViewFolder.php.

// function getPath() { return $this->_document->getID() .'/'. $this->_version . $this->_fileType; }
function getPath() { return $this->_document->getDir() .'/'. $this->_version . $this->_fileType; }


function getDir() { /* {{{ */
if($this->_id > 20000){
$dirid = (int)( $this->_id / 20000 ) + 1;
}else{
$dirid = 1;
}
return $dirid."/".$this->_id."/";
} /* }}} */

That is the approach I had in mind as well. Why do you allow only 20000 documents (dirs) per content subdirectory? You don't need the if() statement because '(int)( $this->_id / 20000 ) + 1' returns 1 for id < 20000 anyway.

Uwe
Reply
#8
(12-05-2011, 07:12 PM)steinm Wrote:
(12-05-2011, 06:47 PM)itsu Wrote: Hi Uwe

I had to input more than 32000.
So I changed getpath() and getDir() in inc.ClassDocument.php like followings.
This support more than 20000*31998 documents.
but supporting lots of document, I also had to change ViewFolder.php.

// function getPath() { return $this->_document->getID() .'/'. $this->_version . $this->_fileType; }
function getPath() { return $this->_document->getDir() .'/'. $this->_version . $this->_fileType; }


function getDir() { /* {{{ */
if($this->_id > 20000){
$dirid = (int)( $this->_id / 20000 ) + 1;
}else{
$dirid = 1;
}
return $dirid."/".$this->_id."/";
} /* }}} */

That is the approach I had in mind as well. Why do you allow only 20000 documents (dirs) per content subdirectory? You don't need the if() statement because '(int)( $this->_id / 20000 ) + 1' returns 1 for id < 20000 anyway.

Uwe

Hi Uwe

I see. I don't need if.
I use this instead. thanks.
I don't have reason to use 20000 you can change it to 31998 or around 30000.
function getDir() { /* {{{ */
$dirid = (int)( $this->_id / 20000 ) + 1;
return $dirid."/".$this->_id."/";
} /* }}} */
Reply


Forum Jump:


Users browsing this thread: