-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 8.1-SNAPSHOT
-
Component/s: Live Connect (Google Drive, Dropbox, OneDrive...)
The following database-level deadlock (detected and broken) should be caught and converted into a ConcurrentUpdateException like all similar exceptions seen at the VCS level.
2016-01-20 14:30:17,047 ERROR [Nuxeo-Work-blobProviderDocumentUpdate-2] [org.nuxeo.ecm.core.work.WorkManagerImpl] Uncaught error on thread Nuxeo-Work-blobProviderDocumentUpdate-2 org.nuxeo.ecm.directory.DirectoryException: updateEntry failed for 4 at org.nuxeo.ecm.directory.sql.SQLSession.updateEntry(SQLSession.java:549) at org.nuxeo.ecm.platform.oauth2.tokens.OAuth2TokenStore.refresh(OAuth2TokenStore.java:192) at org.nuxeo.ecm.platform.oauth2.tokens.OAuth2TokenStore.set(OAuth2TokenStore.java:73) at org.nuxeo.ecm.platform.oauth2.tokens.OAuth2TokenStore.set(OAuth2TokenStore.java:50) at com.google.api.client.auth.oauth2.DataStoreCredentialRefreshListener.makePersistent(DataStoreCredentialRefreshListener.java:94) at com.google.api.client.auth.oauth2.DataStoreCredentialRefreshListener.onTokenResponse(DataStoreCredentialRefreshListener.java:79) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:493) at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343) at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.executeAndCache(GoogleDriveBlobProvider.java:566) at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.getDriveFile(GoogleDriveBlobProvider.java:531) at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.retrieveFile(GoogleDriveBlobProvider.java:510) at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.checkChangesAndUpdateBlob(AbstractLiveConnectBlobProvider.java:120) at org.nuxeo.ecm.liveconnect.update.worker.BlobProviderDocumentsUpdateWork.work(BlobProviderDocumentsUpdateWork.java:72) at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:416) at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:377) at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:338) at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:54) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.postgresql.util.PSQLException: ERROR: deadlock detected Detail: Process 14731 waits for ShareLock on transaction 6103293; blocked by process 14727. Process 14727 waits for ShareLock on transaction 6103294; blocked by process 14731. Hint: See server log for query details. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410) at org.tranql.connector.jdbc.PreparedStatementHandle.execute(PreparedStatementHandle.java:177) at org.nuxeo.ecm.directory.sql.SQLSession.updateEntry(SQLSession.java:547) ... 22 more