AW: [opencms-dev] Problem: Tree view of online project in workplace crashed
Claus Priisholm
cpr at codedroids.com
Wed Jun 30 09:08:00 CEST 2004
Well it is not as much MySQL per say, but rather the choice of
back-end. Traditionally MySQL have been using MyISAM as back-end. This
doesn't provide transactions (not ACID compliant) and what you describe
is exactly what one would expect when a bunch of commands aren't
treated as one atomic transaction.
Given the popularity of MySQL this seems not to happen very often in
'real life' (depending on the application and its usage), but once it
does it often ruins the integrity of the data (i.e. go get your
backup...)
As of MySQL 4 an alternative back-end is included, the InnoDB which do
provide ACID compliance. But to fully utilize transactions and perhaps
other features like referential integrity, the OpenCms might have to be
altered (I am not all to familiar with the low-level database access
code, so no idea how difficult it would be to do that)
Claus
On 29/6-2004, at 8.40, christian meyer wrote:
> Hi!
>
> Thanks a lot!
>
> A database problem was my suspicion too. I wrote a little program to
> check the integrity of the tree and found problems with the tree
> structure you described, too.
>
> We've had some trouble with the renaming of a really big folder. After
> a crash of the browser, we didn't know if there is still a running
> process handling our previous request.
>
> After a plenty of time of waiting, we start another task to this
> folder. After that we've had a perfect chaos with half handled entries
> (e.g. body-entries not changed in control-file, but bodies renamed,
> etc.) and a fragmented tree with lots of broken branches (as you
> described it)
>
> This was in the offline-tables. I don't know how and why but some of
> the found errors are in the online table, too.
>
> However I think the main problem seems to be that there is no
> transaction management with mysql. I don't know if this is a general
> behaviour (I've to check the code first)
>
> I will patch the db-structure and look what's happen... ;)
>
> Kind Regards
>
> Christian
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Christian Pöcher [mailto:Poecher at gmx.net]
> Gesendet: Montag, 28. Juni 2004 23:33
> An: opencms-dev at opencms.org
> Cc: felix.engel at schluer.com
> Betreff: Re: [opencms-dev] Problem: Tree view of online project in
> workplace crashed
>
>
>
> ----- Original Message -----
> From: "Christian Pöcher" <Poecher at gmx.net>
> To: <opencms-dev at opencms.org>
> Cc: <felix.engel at schluer.com>
> Sent: Monday, June 28, 2004 5:23 PM
> Subject: Re: [opencms-dev] Problem: Tree view of online project in
> workplace crashed
>
>
>>> It seems that the Online-VFS is ok. The Website is reachable.
>
>> I didn't check the VFS at DB-level, but I tested an API call via
>> cmsshell - >GetFolderTree or something like that. Everything seemed
>> fine. I also replaced the >whole /system/workplace/ folder, but to no
>> avail.
>
> A co-worker of mine did some more work on this topic and found the
> reason for this behavior. It seems it comes from inconsistent DB
> tables.
>
> The tables CMS_RESOURCE and CMS_ONLINE_RESOURCE have a column
> RESOURCE_ID and PARENT_ID. The folder structure is done by bottom-up
> referencing and results in a tree:
>
> /myfolder (RID:10 PID:1)
> /myfolder/1.html (RID:11 PID:10)
> /myfolder/anotherfolder (RID:12 PID:10) and so on
>
> In CMS_ONLINE_RESOURCES of our DB we found not one tree, but more,
> with resources that don't have a proper parent. Deleting the orphans
> fixed the tree and also the tree view in the workplace.
>
> We wonder however, what is the reason for the DB inconstistency. We
> don't know how to reproduce that error. However, I feel there is a
> connection to the error described by Jarkko Ketola on 24.06.2004.
> Both, the tree view error and the error from Jarkko happend on files
> and folders which our customers tried to delete. Any ideas what would
> trigger the inconsistency? Maybe atomicity of some VFS operations is
> not given? Does mysql hande the data unsafe? What would happen, if I
> shutdown tomcat, while some VFS ops are done?
>
> chris
> --
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>
> SCHLUER CONSULTING
> Christian Pöcher
> Im Winkel 32
> 52224 Stolberg
> Tel.: +49 (2402) 1029931
> Fax: +49 (2402) 1029933
> E-Mail: christian.poecher at schluer.com
> Website: www.schluer.com
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
--
Claus Priisholm, CodeDroids ApS
+45 48 22 46 46
cpr (you-know-what) interlet.dk - cpr (you-know-what) codedroids.com
http://www.interlet.dk - http://www.codedroids.com
More information about the opencms-dev
mailing list