Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59786E8A7 for ; Wed, 28 Nov 2012 09:33:01 +0000 (UTC) Received: (qmail 89442 invoked by uid 500); 28 Nov 2012 09:33:00 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 89192 invoked by uid 500); 28 Nov 2012 09:32:59 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 89051 invoked by uid 99); 28 Nov 2012 09:32:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 09:32:58 +0000 Date: Wed, 28 Nov 2012 09:32:58 +0000 (UTC) From: "Marcel Reutegger (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <244062281.31829.1354095178621.JavaMail.jiratomcat@arcas> In-Reply-To: <512419697.31814.1354094700129.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (JCR-3466) NPE in SingletonTokenStream MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505328#comment-13505328 ] Marcel Reutegger commented on JCR-3466: --------------------------------------- This is what happens: - a thread triggers committing of pending changes in AbstractIndex.addDocument() - the pooled threads start to invert the documents - the calling thread is interrupted and does not clear the pending Map in VolatileIndex.commitPending() - another thread will commit those pending documents again, but now the SingletonTokenStream in those documents may already be closed. I think it would be better to wait for the CountDownLatch again even if the calling thread is interrupted. > NPE in SingletonTokenStream > --------------------------- > > Key: JCR-3466 > URL: https://issues.apache.org/jira/browse/JCR-3466 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: 2.4 > Reporter: Marcel Reutegger > Assignee: Marcel Reutegger > Priority: Minor > > Occasionally I see a NPE in SingletonTokenStream when the thread triggering the index update is interrupted: > Exception in thread "DynamicPooledExecutor" java.lang.NullPointerException > at org.apache.jackrabbit.core.query.lucene.SingletonTokenStream.incrementToken(SingletonTokenStream.java:89) > at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:141) > at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:276) > at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:766) > at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2060) > at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2034) > at org.apache.jackrabbit.core.query.lucene.AbstractIndex$1.run(AbstractIndex.java:198) > 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) -- 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