AnsweredAssumed Answered

Failed to purge nodes

Question asked by ashwini on Oct 18, 2012
Hi All ,

As Alfresco's job was failing to purge nodes tried doing below workaround:-

I did full indexing and found the node for which it was failing(Something like below for multiple nodes)
2012-10-18 04:27:02,902  ERROR [index.AbstractReindexComponent.threads] [indexTrackerThread1] Reindexer   206 failed with error: Possible cache integrity issue during reindexing; nested exception is org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/16a0b417-6aca-4e03-96d2-97debcf93357(Status[changeTxnId=927d124a-41ca-4b1e-9d9b-afd0067edd56, dbTxnId=230497, deleted=true]).
2012-10-18 04:27:02,904  WARN  [index.AbstractReindexComponent.threads] [indexTrackerThread1] org.springframework.dao.ConcurrencyFailureException: Possible cache integrity issue during reindexing; nested exception is org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/16a0b417-6aca-4e03-96d2-97debcf93357(Status[changeTxnId=927d124a-41ca-4b1e-9d9b-afd0067edd56, dbTxnId=230497, deleted=true])
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl$1.execute(AbstractLuceneIndexerImpl.java:720)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.doInReadthroughTransaction(AbstractLuceneIndexerImpl.java:702)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.readDocuments(ADMLuceneIndexerImpl.java:1980)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.flushPending(ADMLuceneIndexerImpl.java:1044)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.flush(AbstractLuceneIndexerAndSearcherFactory.java:874)
   at sun.reflect.GeneratedMethodAccessor337.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
   at $Proxy215.flush(Unknown Source)
   at org.alfresco.repo.search.IndexerComponent.flushPending(IndexerComponent.java:133)
   at org.alfresco.repo.node.index.AbstractReindexComponent$ReindexWorkerRunnable.beforeCommit(AbstractReindexComponent.java:1086)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:747)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:727)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:687)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:927)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:472)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:410)
   at org.alfresco.repo.node.index.AbstractReindexComponent$ReindexWorkerRunnable.run(AbstractReindexComponent.java:1008)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/16a0b417-6aca-4e03-96d2-97debcf93357(Status[changeTxnId=927d124a-41ca-4b1e-9d9b-afd0067edd56, dbTxnId=230497, deleted=true])
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:176)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getPaths(DbNodeServiceImpl.java:2174)
   at sun.reflect.GeneratedMethodAccessor309.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.getPaths(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor309.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
   at $Proxy9.getPaths(Unknown Source)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl$3.doWork(ADMLuceneIndexerImpl.java:682)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl$3.doWork(ADMLuceneIndexerImpl.java:668)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.createDocumentsImpl(ADMLuceneIndexerImpl.java:667)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.createDocuments(ADMLuceneIndexerImpl.java:633)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl$4.execute(ADMLuceneIndexerImpl.java:1985)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl$4.execute(ADMLuceneIndexerImpl.java:1981)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl$1.execute(AbstractLuceneIndexerImpl.java:715)
   … 26 more

based on below line I found the UUID of node and then checked in alf_node table. Where I got parent_node_id and based on this parent_node_id I looked for entry in alf_child_assoc and removed the same. (because I was getting foreign key exception for alf_node and alf_child_assoc  while purging nodes)
Caused by: org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/16a0b417-6aca-4e03-96d2-97debcf93357(Status[changeTxnId=927d124a-41ca-4b1e-9d9b-afd0067edd56, dbTxnId=230497, deleted=true])

And started server:

Now I found some different exception while full indexing , and still failing to purge nodes. Same workaround worked fine with another backup( both backup has same failing nodes)

2012-10-18 12:46:54,786  ERROR [index.AbstractReindexComponent.threads] [indexTrackerThread2] Reindexer   297 failed with error: null.
2012-10-18 12:46:54,799  WARN  [index.AbstractReindexComponent.threads] [indexTrackerThread2] java.lang.NullPointerException
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.createDocumentsImpl(ADMLuceneIndexerImpl.java:803)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.createDocuments(ADMLuceneIndexerImpl.java:633)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl$4.execute(ADMLuceneIndexerImpl.java:1985)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl$4.execute(ADMLuceneIndexerImpl.java:1981)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl$1.execute(AbstractLuceneIndexerImpl.java:715)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.doInReadthroughTransaction(AbstractLuceneIndexerImpl.java:702)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.readDocuments(ADMLuceneIndexerImpl.java:1980)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.flushPending(ADMLuceneIndexerImpl.java:1044)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.flush(AbstractLuceneIndexerAndSearcherFactory.java:874)
   at sun.reflect.GeneratedMethodAccessor337.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
   at $Proxy215.flush(Unknown Source)
   at org.alfresco.repo.search.IndexerComponent.flushPending(IndexerComponent.java:133)
   at org.alfresco.repo.node.index.AbstractReindexComponent$ReindexWorkerRunnable.beforeCommit(AbstractReindexComponent.java:1086)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:747)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:727)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:687)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:927)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:472)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:410)
   at org.alfresco.repo.node.index.AbstractReindexComponent$ReindexWorkerRunnable.run(AbstractReindexComponent.java:1008)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)

has anybody faced this issue ?

-Ashwini

Outcomes