Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Dustin Kintanar
Document Library - DBStore Details/Documentation
21 de marzo de 2013 9:39
Respuesta

Dustin Kintanar

Ranking: New Member

Mensajes: 9

Fecha de incorporación: 6 de febrero de 2013

Mensajes recientes

Hello everyone,

It seems that the recommended way to store document in the database is now the DBStore as opposed to Jackrabbit via the JCRStore. We are currently experimenting with it, but the documentation on it seems to be a bit lacking. On the Document Library Portlet page in the User Guide, there is only mention of it as an option and throughout the forums and customer knowledge base, there only seems to be mentions of it as a recommended alternative to the JCRStore.

From what I have found:
  • The documents are stored within the Liferay Database. After running the migration from the JCRStore to the DBStore, my Liferay database grew from ~1050MB to ~3400MB
  • It takes up less space than the JCRStore - our library of ~9000 was about 6GB, but per the above bullet, the resulting entire Liferay database was much smaller.
  • It seems to utilize the same connection pool as Liferay.
  • Testing thus far seems to indicate that it's a bit faster than the JCRStore, but we're still in the process of testing.
  • The migration from the JCRStore to the DBStore (enabled through a patch received from Liferay Support for EE) took 4 hours for the ~9000 documents, so its definitely not something to sit around and watch.

What I'm hoping to find out without diving into the code:
  • What tables are the documents stored in? If we were to migrate away from the DBStore, how would we be able to clean it up?
  • Are there any other options available for the DBStore? Is it possible to point it to a separate connection pool, limit connections available to it, etc..?
  • Any other helpful details...

Is there detailed documentation anyone has found for it?

Thanks,
Dustin
Daniel Tyger
RE: Document Library - DBStore Details/Documentation
30 de enero de 2014 8:07
Respuesta

Daniel Tyger

Ranking: Junior Member

Mensajes: 44

Fecha de incorporación: 5 de febrero de 2013

Mensajes recientes

Hi Dustin,

Thank you for your post - I have been pondering similar questions. We, too, have been using JCR for several years and are upgrading and likely adopting EE soon. I am still utilizing 6.1.2 GA3 CE to attempt the document migration and will let you know, here, what I learn along the way regarding location of documents, images, etc., and whether or not the CE migration process actually completes...

Here is the DBStore java class documentation for 6.1.2 GA3: http://docs.liferay.com/portal/6.1/javadocs-all/com/liferay/portlet/documentlibrary/store/DBStore.html

And, here is the Convert DL java file for 6.1. Replacing 6.2 for 6.1 in the uRL will take you to the 6.2 version of the same file: http://docs.liferay.com/portal/6.1/javadocs-all/src-html/com/liferay/portal/convert/ConvertDocumentLibrary.html

In case these files help you...

Perhaps, we can keep this thread alive as a resource on this topic. Inputs welcome from those migrating or with experience or tips, here. -daniel
Daniel Tyger
RE: Document Library - DBStore Details/Documentation
30 de enero de 2014 9:12
Respuesta

Daniel Tyger

Ranking: Junior Member

Mensajes: 44

Fecha de incorporación: 5 de febrero de 2013

Mensajes recientes

FYI - In 6.1.2 GA3 the DBStore option is in the drop-down menu in CP >> Server Administration > Migration.

The migration was fast and appeared to migrate all the documents and images. A nice bonus was that I got a nice set of exceptions identifying problematic files (Prior migration logs were not helpful in this regard...)

After rebooting with the new DBStore, it appears the documents are migrated fine.

The content itself appears to have been moved from JCR >> a table called "dlcontent' with the blob info ending up in the 'data_' field... table info and takes this form:
+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| contentId | bigint(20) | NO | PRI | NULL | |
| groupId | bigint(20) | YES | | NULL | |
| companyId | bigint(20) | YES | MUL | NULL | |
| repositoryId | bigint(20) | YES | | NULL | |
| path_ | varchar(255) | YES | | NULL | |
| version | varchar(75) | YES | | NULL | |
| data_ | longblob | YES | | NULL | |
| size_ | bigint(20) | YES | | NULL | |
+--------------+--------------+------+-----+---------+-------+

You may no longer need this info, but for others who come along, it may be useful.
-daniel