[ 
https://issues.apache.org/jira/browse/CASSANDRA-12926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16569415#comment-16569415
 ] 

ASF GitHub Bot commented on CASSANDRA-12926:
--------------------------------------------

GitHub user ayudovin opened a pull request:

    https://github.com/apache/cassandra/pull/245

    rejected execution exception logged when task already completed

    this [improvement](https://issues.apache.org/jira/browse/CASSANDRA-12926) 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ayudovin/cassandra 
12926-reject-exception-when-task-completed

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cassandra/pull/245.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #245
    
----
commit ad43f99521024cda1898dc92ca2fa601cf8420b1
Author: artsiom <a.yudovin@...>
Date:   2018-08-05T09:23:33Z

    rejected execution exception logged when task already completed

----


> RejectedExecutionException logged as SEVERE when task already completed
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-12926
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12926
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Streaming and Messaging
>         Environment: 2.1.16
>            Reporter: Sebastien Bonnet
>            Priority: Minor
>
> The issue is triggered by the MessagingService expiring a repair Snapshot 
> which Executor has already been shutdown and is an a TERMINATED state. 
> In this case trying to complete the SnapshotTask has little value, since the 
> Task is already completed. Yet the error is reported as SEVERE by the guava 
> library and shows in the journal logs. 
> Perhaps the Callback could check if the task is already complete before 
> setting the exception?
> https://github.com/apache/cassandra/blob/cassandra-2.1.16/src/java/org/apache/cassandra/repair/SnapshotTask.java#L78
>  
> {noformat}
> Nov 15, 2016 8:49:31 PM com.google.common.util.concurrent.ExecutionList 
> executeListener
> SEVERE: RuntimeException while executing runnable 
> com.google.common.util.concurrent.Futures$4@3df75dd9 with executor 
> com.google.common.util.concurrent.MoreExecutors$ListeningDecorator@370f36a9
> java.util.concurrent.RejectedExecutionException: Task 
> com.google.common.util.concurrent.Futures$4@3df75dd9 rejected from 
> java.util.concurrent.ThreadPoolExecutor@3330a417[Terminated, pool size = 0, 
> active threads = 0, queued tasks = 0, completed tasks = 17]
>         at 
> java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
>         at 
> java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
>         at 
> java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
>         at 
> com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484)
>         at 
> com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
>         at 
> com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
>         at 
> com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202)
>         at 
> com.google.common.util.concurrent.Futures$CombinedFuture.setExceptionAndMaybeLog(Futures.java:1566)
>         at 
> com.google.common.util.concurrent.Futures$CombinedFuture.setOneValue(Futures.java:1617)
>         at 
> com.google.common.util.concurrent.Futures$CombinedFuture.access$400(Futures.java:1470)
>         at 
> com.google.common.util.concurrent.Futures$CombinedFuture$2.run(Futures.java:1548)
>         at 
> com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
>         at 
> com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
>         at 
> com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
>         at 
> com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202)
>         at 
> org.apache.cassandra.repair.SnapshotTask.access$200(SnapshotTask.java:34)
>         at 
> org.apache.cassandra.repair.SnapshotTask$SnapshotCallback.onFailure(SnapshotTask.java:78)
>         at 
> org.apache.cassandra.net.MessagingService$5$1.run(MessagingService.java:374)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to