[ 
https://issues.apache.org/jira/browse/JCR-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luca Tagliani updated JCR-3440:
-------------------------------

    Attachment: threadDump-JCR-3440.txt

Attached the thread dump.

In this dump, thread http-8080-24 is waiting to write on the DB, while all the 
other thread are waiting on it.
The fact is that PostgreSQL (the DB used during this debugging session) reports 
a deadlock between the process connected with this thread (blocked) and another 
process stuck in state "INIT - in transaction" (blocker).

Another information is that, if I use H2 as a DB, the problem doesn't happen 
because the H2 database has a LOCK_TIMEOUT default of 1 second, while in other 
DB (like Postgres and MSSQL) this value is infinite.

The effect is that the transaction is ended at the timeout and the JR log 
report an error synchronizing journal.
I don't know if this error can cause any inconsistency in the journal.

Returning to the timeout; this could be set on the entire DB instance or by 
statement, but ther's no way to specify this in JR.

BR

Luca
                
> Deadlock on LOCAL_REVISION table in clustering environment
> ----------------------------------------------------------
>
>                 Key: JCR-3440
>                 URL: https://issues.apache.org/jira/browse/JCR-3440
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: clustering
>    Affects Versions: 2.4.3
>         Environment: Env.1: 4x Linux server CentOS 5 MSSQL 2008 database 
> (production system)
> Env.2: 2x Linux Ubuntu 10.04 server tested with PostgreSQL 9.1, H2, MSSQL 
> 2008 and mySQL 5.5 (lab system)
>            Reporter: Luca Tagliani
>            Priority: Critical
>         Attachments: JCR-3440.patch, threadDump-JCR-3440.txt
>
>
> When inserting a lot of nodes concurrently (100/200 threads) the system hangs 
> generating a deadlock on the LOCAL_REVISION table.
> There is a thread that starts a transaction but the transaction remains open, 
> while another thread tries to acquire the lock on the table.
> This actually happen even if there is only a server up but configured in 
> cluster mode.
> I found that in AbstractJournal, we try to write the LOCAL_REVISION even if 
> we don't sync any record because they're generated by the same journal of the 
> thread running.
> Removing this unnecessary (to me :-) ) write to the LOCAL_REVISION table, 
> remove the deadlock.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to