<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dead-lock detected during TagService.tag operation in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316177#M3178</link>
    <description>&lt;P&gt;Pouvez-vous mettre à jour la question initiale avec un lien (pastebin) sur le log d'erreur ?&lt;/P&gt;</description>
    <pubDate>Mon, 27 Oct 2014 18:36:40 GMT</pubDate>
    <dc:creator>Florent_Guillau</dc:creator>
    <dc:date>2014-10-27T18:36:40Z</dc:date>
    <item>
      <title>Dead-lock detected during TagService.tag operation</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316173#M3174</link>
      <description>&lt;P&gt;Bonjour&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;contexte: 5.8 + HF21 - Windows - DtB:H2 - Installation locale avec un seul utilisateur&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;J'ai créé une opération SetDocumentTag implémentée ainsi:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; public void run(DocumentModel input) throws Exception {
    TagService service = Framework.getLocalService(TagService.class);
    String docId = input.getId();
    log.error("SetDocumentTag&amp;gt; docId=" + docId + " tag=" + label + " username=" + username);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;-&amp;gt;      service.tag(session, docId, label, username);
session.save();
}&lt;/P&gt;
&lt;P&gt;De temps en temps j'ai l'erreur suivante dans l'appel service.tag:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Caused by: org.nuxeo.ecm.core.api.ConcurrentUpdateDocumentException: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageE
xception: org.h2.jdbc.JdbcBatchUpdateException: Deadlock detected. The current transaction was rolled back. Details:
Session #7 (user: SA) is waiting to lock PUBLIC.HIERARCHY while locking PUBLIC.CONTENT (exclusive), PUBLIC.FULLTEXT (exc
lusive).
Session #5 (user: SA) is waiting to lock PUBLIC.FULLTEXT while locking , PUBLIC.HIERARCHY (exclusive), PUBLIC.MISC (excl
usive), PUBLIC.RELATION (exclusive).; SQL statement:
INSERT INTO "FULLTEXT" ("ID", "JOBID", "SIMPLETEXT", "BINARYTEXT", "SIMPLETEXT_TITLE", "BINARYTEXT_TITLE", "SIMPLETEXT_D
ESCRIPTION", "BINARYTEXT_DESCRIPTION") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [40001-114]
        at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.save(SQLSession.java:159)
        at org.nuxeo.ecm.core.api.AbstractSession.save(AbstractSession.java:1908)
        ... 100 more
Caused by: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageException: org.h2.jdbc.JdbcBatchUpdateException: Deadlock d
etected. The current transaction was rolled back. Details:
Session #7 (user: SA) is waiting to lock PUBLIC.HIERARCHY while locking PUBLIC.CONTENT (exclusive), PUBLIC.FULLTEXT (exc
lusive).
Session #5 (user: SA) is waiting to lock PUBLIC.FULLTEXT while locking , PUBLIC.HIERARCHY (exclusive), PUBLIC.MISC (excl
usive), PUBLIC.RELATION (exclusive).; SQL statement:
INSERT INTO "FULLTEXT" ("ID", "JOBID", "SIMPLETEXT", "BINARYTEXT", "SIMPLETEXT_TITLE", "BINARYTEXT_TITLE", "SIMPLETEXT_D
ESCRIPTION", "BINARYTEXT_DESCRIPTION") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [40001-114]
        at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:323)
        at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:605)
        at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:502)
        at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:472)
        at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:427)
        at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:391)
        at org.nuxeo.ecm.core.storage.sql.SessionImpl.flushAndScheduleWork(SessionImpl.java:365)
        at org.nuxeo.ecm.core.storage.sql.SessionImpl.save(SessionImpl.java:344)
        at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.save(ConnectionImpl.java:184)
        at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.save(SQLSession.java:157)
        ... 101 more
Caused by: org.h2.jdbc.JdbcBatchUpdateException: Deadlock detected. The current transaction was rolled back. Details:
Session #7 (user: SA) is waiting to lock PUBLIC.HIERARCHY while locking PUBLIC.CONTENT (exclusive), PUBLIC.FULLTEXT (exc
lusive).
Session #5 (user: SA) is waiting to lock PUBLIC.FULLTEXT while locking , PUBLIC.HIERARCHY (exclusive), PUBLIC.MISC (excl
usive), PUBLIC.RELATION (exclusive).; SQL statement:
INSERT INTO "FULLTEXT" ("ID", "JOBID", "SIMPLETEXT", "BINARYTEXT", "SIMPLETEXT_TITLE", "BINARYTEXT_TITLE", "SIMPLETEXT_D
ESCRIPTION", "BINARYTEXT_DESCRIPTION") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [40001-114]
        at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1067)
        at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:590)
        ... 109 more
Caused by: org.h2.jdbc.JdbcSQLException: Deadlock detected. The current transaction was rolled back. Details:
Session #7 (user: SA) is waiting to lock PUBLIC.HIERARCHY while locking PUBLIC.CONTENT (exclusive), PUBLIC.FULLTEXT (exc
lusive).
Session #5 (user: SA) is waiting to lock PUBLIC.FULLTEXT while locking , PUBLIC.HIERARCHY (exclusive), PUBLIC.MISC (excl
usive), PUBLIC.RELATION (exclusive).; SQL statement:
INSERT INTO "FULLTEXT" ("ID", "JOBID", "SIMPLETEXT", "BINARYTEXT", "SIMPLETEXT_TITLE", "BINARYTEXT_TITLE", "SIMPLETEXT_D
ESCRIPTION", "BINARYTEXT_DESCRIPTION") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [40001-114]
        at org.h2.message.Message.getSQLException(Message.java:105)
        at org.h2.message.Message.getSQLException(Message.java:116)
        at org.h2.message.Message.getSQLException(Message.java:75)
        at org.h2.table.TableData.doLock(TableData.java:426)
        at org.h2.table.TableData.lock(TableData.java:373)
        at org.h2.command.dml.Insert.update(Insert.java:100)
        at org.h2.command.CommandContainer.update(CommandContainer.java:72)
        at org.h2.command.Command.executeUpdate(Command.java:208)
        at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:139)
        at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1050)
        ... 112 more
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Comment protéger cet appel contre les transactions non terminées?&lt;/P&gt;
&lt;P&gt;Il semble que des événements ne sont pas encore traités au moment de l'appel au TagService ...&lt;/P&gt;
&lt;P&gt;Merci de votre aide&lt;/P&gt;
&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 10:36:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316173#M3174</guid>
      <dc:creator>Arnault_</dc:creator>
      <dc:date>2014-10-27T10:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dead-lock detected during TagService.tag operation</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316174#M3175</link>
      <description>&lt;P&gt;La base embedded h2 gère très mal la concurrence et n'est donc pas adaptée à quelque sorte de production que ce soit. Nous vous conseillons d'utiliser PostgreSQL par exemple.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 12:05:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316174#M3175</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2014-10-27T12:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dead-lock detected during TagService.tag operation</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316175#M3176</link>
      <description>&lt;P&gt;Bonjour&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 13:17:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316175#M3176</guid>
      <dc:creator>Arnault_</dc:creator>
      <dc:date>2014-10-27T13:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dead-lock detected during TagService.tag operation</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316176#M3177</link>
      <description>&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 14:05:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316176#M3177</guid>
      <dc:creator>Arnault_</dc:creator>
      <dc:date>2014-10-27T14:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dead-lock detected during TagService.tag operation</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316177#M3178</link>
      <description>&lt;P&gt;Pouvez-vous mettre à jour la question initiale avec un lien (pastebin) sur le log d'erreur ?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 18:36:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/dead-lock-detected-during-tagservice-tag-operation/m-p/316177#M3178</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2014-10-27T18:36:40Z</dc:date>
    </item>
  </channel>
</rss>

