Running ES reindexing with PostgreSQL 9.5 may result in error like:
016-11-15 15:41:11,759 ERROR [Nuxeo-Work-elasticSearchIndexing-5:93609500308275.64287571] [org.nuxeo.ecm.core.work.AbstractWork] Exception during work: ScrollingIndexingWorker(, Progress(?%, ?/0), null) org.nuxeo.ecm.core.api.NuxeoException: Error during scroll at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.scroll(JDBCMapper.java:1084) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:42) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:85) at com.sun.proxy.$Proxy58.scroll(Unknown Source) at org.nuxeo.ecm.core.storage.sql.SoftRefCachingMapper.scroll(SoftRefCachingMapper.java:62) at org.nuxeo.ecm.core.storage.sql.SessionImpl.scroll(SessionImpl.java:891) at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.scroll(ConnectionImpl.java:214) at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.scroll(SQLSession.java:173) at org.nuxeo.ecm.core.api.AbstractSession.scroll(AbstractSession.java:1245) at org.nuxeo.elasticsearch.work.ScrollingIndexingWorker.doWork(ScrollingIndexingWorker.java:82) at org.nuxeo.elasticsearch.work.BaseIndexingWorker.work(BaseIndexingWorker.java:48) 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:57) 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: portal "C_103" does not exist at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155) at org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:2385) at org.postgresql.jdbc.PgResultSet.next(PgResultSet.java:1841) at org.tranql.connector.jdbc.ResultSetHandle.next(ResultSetHandle.java:804) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.scroll(JDBCMapper.java:1073) ... 21 more
Because cursor can not be reused between transaction,
without the ResultSet.HOLD_CURSORS_OVER_COMMIT option.
- causes
-
NXP-32811 Scroll on PostgreSQL doesn't use a cursor based ResultSet
- Resolved