[jira] [Commented] (CASSANDRA-2061) Missing logging for some exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13085985#comment-13085985 ] Hudson commented on CASSANDRA-2061: --- Integrated in Cassandra #1027 (See [https://builds.apache.org/job/Cassandra/1027/]) Fix missing logging for some exceptions patch by Jonathan Ellis; reviewed by Pavel Yaskevich for CASSANDRA-2061 xedin : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1158439 Files : * /cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java * /cassandra/trunk/src/java/org/apache/cassandra/concurrent/RetryingScheduledThreadPoolExecutor.java * /cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor.java * /cassandra/trunk/CHANGES.txt * /cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java * /cassandra/trunk/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java * /cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java Missing logging for some exceptions --- Key: CASSANDRA-2061 URL: https://issues.apache.org/jira/browse/CASSANDRA-2061 Project: Cassandra Issue Type: Bug Components: Core Reporter: Stu Hood Assignee: Jonathan Ellis Priority: Minor Fix For: 1.0 Attachments: 2061-0.7.txt, 2061-v3.txt, 2061.txt Original Estimate: 8h Remaining Estimate: 8h {quote}Since you are using ScheduledThreadPoolExecutor.schedule(), the exception was swallowed by the FutureTask. You will have to perform a get() method on the ScheduledFuture, and you will get ExecutionException if there was any exception occured in run().{quote} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2061) Missing logging for some exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13084958#comment-13084958 ] Jonathan Ellis commented on CASSANDRA-2061: --- Figured out the problem. Here's the new version of logExceptionsAfterExecute that fixes it: {code} public static void logExceptionsAfterExecute(Runnable r, Throwable t) { -// exceptions wrapped by FutureTask -if (r instanceof FutureTask?) +// Check for exceptions wrapped by FutureTask. We do this by calling get(), which will +// cause it to throw any saved exception. +// +// Complicating things, calling get() on a ScheduledFutureTask will block until the task +// is cancelled. Hence, the extra isDone check beforehand. +if ((r instanceof Future?) ((Future?) r).isDone()) { try { -((FutureTask?) r).get(); +((Future?) r).get(); } {code} Missing logging for some exceptions --- Key: CASSANDRA-2061 URL: https://issues.apache.org/jira/browse/CASSANDRA-2061 Project: Cassandra Issue Type: Bug Components: Core Reporter: Stu Hood Assignee: Jonathan Ellis Priority: Minor Fix For: 1.0 Attachments: 2061-0.7.txt, 2061-v3.txt, 2061.txt Original Estimate: 8h Remaining Estimate: 8h {quote}Since you are using ScheduledThreadPoolExecutor.schedule(), the exception was swallowed by the FutureTask. You will have to perform a get() method on the ScheduledFuture, and you will get ExecutionException if there was any exception occured in run().{quote} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-2061) Missing logging for some exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12988646#comment-12988646 ] Stu Hood commented on CASSANDRA-2061: - Based on anecdotal evidence (it exposed an exception I was expecting), this looks good. But it looks like we can probably merge Debuggable(Scheduled)ThreadPool... they are appear to be essentially identical now. Missing logging for some exceptions --- Key: CASSANDRA-2061 URL: https://issues.apache.org/jira/browse/CASSANDRA-2061 Project: Cassandra Issue Type: Bug Components: Core Reporter: Stu Hood Assignee: Jonathan Ellis Fix For: 0.7.2 Attachments: 2061-0.7.txt, 2061.txt {quote}Since you are using ScheduledThreadPoolExecutor.schedule(), the exception was swallowed by the FutureTask. You will have to perform a get() method on the ScheduledFuture, and you will get ExecutionException if there was any exception occured in run().{quote} -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-2061) Missing logging for some exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12988647#comment-12988647 ] Jonathan Ellis commented on CASSANDRA-2061: --- From the STPE javadoc, it sounds like STPE is more heavyweight than TPE and you don't want to use the former when all you need API-wise is the latter. I have not done the code diving to confirm this though. Missing logging for some exceptions --- Key: CASSANDRA-2061 URL: https://issues.apache.org/jira/browse/CASSANDRA-2061 Project: Cassandra Issue Type: Bug Components: Core Reporter: Stu Hood Assignee: Jonathan Ellis Fix For: 0.7.2 Attachments: 2061-0.7.txt, 2061.txt {quote}Since you are using ScheduledThreadPoolExecutor.schedule(), the exception was swallowed by the FutureTask. You will have to perform a get() method on the ScheduledFuture, and you will get ExecutionException if there was any exception occured in run().{quote} -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-2061) Missing logging for some exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12988648#comment-12988648 ] Jonathan Ellis commented on CASSANDRA-2061: --- STPE also notes, bq. While this class inherits from ThreadPoolExecutor, a few of the inherited tuning methods are not useful for it. In particular, because it acts as a fixed-sized pool using corePoolSize threads and an unbounded queue, adjustments to maximumPoolSize have no useful effect. We've wanted bounded queues in the past, and we definitely still use growable pools in places, so that's another reason to keep both. Missing logging for some exceptions --- Key: CASSANDRA-2061 URL: https://issues.apache.org/jira/browse/CASSANDRA-2061 Project: Cassandra Issue Type: Bug Components: Core Reporter: Stu Hood Assignee: Jonathan Ellis Fix For: 0.7.2 Attachments: 2061-0.7.txt, 2061.txt {quote}Since you are using ScheduledThreadPoolExecutor.schedule(), the exception was swallowed by the FutureTask. You will have to perform a get() method on the ScheduledFuture, and you will get ExecutionException if there was any exception occured in run().{quote} -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-2061) Missing logging for some exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12988107#action_12988107 ] Jonathan Ellis commented on CASSANDRA-2061: --- bq. 2061-0.7.txt doesn't apply to the 0.7 branch wfm against raw svn. is the git mirror behind again? Missing logging for some exceptions --- Key: CASSANDRA-2061 URL: https://issues.apache.org/jira/browse/CASSANDRA-2061 Project: Cassandra Issue Type: Bug Components: Core Reporter: Stu Hood Fix For: 0.7.2 Attachments: 2061-0.7.txt, 2061.txt, 2061.txt {quote}Since you are using ScheduledThreadPoolExecutor.schedule(), the exception was swallowed by the FutureTask. You will have to perform a get() method on the ScheduledFuture, and you will get ExecutionException if there was any exception occured in run().{quote} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-2061) Missing logging for some exceptions
[ https://issues.apache.org/jira/browse/CASSANDRA-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12987750#action_12987750 ] Stu Hood commented on CASSANDRA-2061: - * 2061.txt doesn't completely remove RetryingSTPE.java, and doesn't replace the usage in CFStore * 2061-0.7.txt doesn't apply to the 0.7 branch Also, will we need a separate patch for trunk? Missing logging for some exceptions --- Key: CASSANDRA-2061 URL: https://issues.apache.org/jira/browse/CASSANDRA-2061 Project: Cassandra Issue Type: Bug Components: Core Reporter: Stu Hood Fix For: 0.7.2 Attachments: 2061-0.7.txt, 2061.txt {quote}Since you are using ScheduledThreadPoolExecutor.schedule(), the exception was swallowed by the FutureTask. You will have to perform a get() method on the ScheduledFuture, and you will get ExecutionException if there was any exception occured in run().{quote} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.