Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-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 092A09A42 for ; Tue, 29 May 2012 16:25:25 +0000 (UTC) Received: (qmail 28724 invoked by uid 500); 29 May 2012 16:25:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 28668 invoked by uid 500); 29 May 2012 16:25:23 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 28660 invoked by uid 99); 29 May 2012 16:25:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 May 2012 16:25:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 82AAA142837 for ; Tue, 29 May 2012 16:25:23 +0000 (UTC) Date: Tue, 29 May 2012 16:25:23 +0000 (UTC) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Message-ID: <1935349395.11508.1338308723537.JavaMail.jiratomcat@issues-vm> In-Reply-To: <2073689574.11472.1338308363360.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (LUCENE-4083) RateLimited.pause() throws unchecked exception 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/LUCENE-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284911#comment-13284911 ] Michael McCandless commented on LUCENE-4083: -------------------------------------------- But, shouldn't we re-throw? Ie, you interrupt so that the thread stops sleeping and throws an exception? Something somewhere higher up must catch the ThreadInterruptedException I think? > RateLimited.pause() throws unchecked exception > ---------------------------------------------- > > Key: LUCENE-4083 > URL: https://issues.apache.org/jira/browse/LUCENE-4083 > Project: Lucene - Java > Issue Type: Bug > Components: core/store > Affects Versions: 4.0 > Reporter: Andrzej Bialecki > Fix For: 4.0 > > > The while() loop in RateLimiter.pause() invokes Thread.sleep() with potentially large values, which occasionally results in InterruptedException being thrown from Thread.sleep(). This is wrapped in an unchecked ThreadInterruptedException and re-thrown, and results in high-level errors like this: > {code} > [junit] 2012-05-29 15:50:15,464 ERROR core.SolrCore - org.apache.lucene.util.ThreadInterruptedException: java.lang.InterruptedException: sleep interrupted > [junit] at org.apache.lucene.store.RateLimiter.pause(RateLimiter.java:82) > [junit] at org.apache.lucene.store.MockIndexOutputWrapper.writeBytes(MockIndexOutputWrapper.java:82) > [junit] at org.apache.lucene.store.MockIndexOutputWrapper.writeByte(MockIndexOutputWrapper.java:73) > [junit] at org.apache.lucene.store.DataOutput.writeVInt(DataOutput.java:191) > [junit] at org.apache.lucene.codecs.lucene40.Lucene40PostingsWriter.addPosition(Lucene40PostingsWriter.java:237) > [junit] at org.apache.lucene.index.FreqProxTermsWriterPerField.flush(FreqProxTermsWriterPerField.java:519) > [junit] at org.apache.lucene.index.FreqProxTermsWriter.flush(FreqProxTermsWriter.java:92) > [junit] at org.apache.lucene.index.TermsHash.flush(TermsHash.java:117) > [junit] at org.apache.lucene.index.DocInverter.flush(DocInverter.java:53) > [junit] at org.apache.lucene.index.DocFieldProcessor.flush(DocFieldProcessor.java:81) > [junit] at org.apache.lucene.index.DocumentsWriterPerThread.flush(DocumentsWriterPerThread.java:475) > [junit] at org.apache.lucene.index.DocumentsWriter.doFlush(DocumentsWriter.java:422) > [junit] at org.apache.lucene.index.DocumentsWriter.flushAllThreads(DocumentsWriter.java:553) > [junit] at org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:2416) > [junit] at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2548) > [junit] at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2530) > [junit] at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:414) > [junit] at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:82) > {code} > I believe this is a bug - the while() loop already ensures that the total time spent in pause() is correct even if InterruptedException-s are thrown, so they should not be re-thrown. > The patch is trivial - simply don't re-throw. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org