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

ASF GitHub Bot commented on TEPHRA-242:
---------------------------------------

Github user anew commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/49#discussion_r137879378
  
    --- Diff: 
tephra-core/src/main/java/org/apache/tephra/distributed/TransactionService.java 
---
    @@ -121,15 +121,15 @@ public void failed(State from, Throwable failure) {
           @Override
           public void follower() {
             ListenableFuture<State> stopFuture = null;
    +        if (pruningService != null && pruningService.isRunning()) {
    +          // Wait for pruning service to stop after un-registering from 
discovery
    +          stopFuture = pruningService.stop();
    +        }
             // First stop the transaction server as un-registering from 
discovery can block sometimes.
             // That can lead to multiple transaction servers being active at 
the same time.
             if (server != null && server.isRunning()) {
               server.stopAndWait();
             }
    -        if (pruningService != null && pruningService.isRunning()) {
    -          // Wait for pruning service to stop after un-registering from 
discovery
    -          stopFuture = pruningService.stop();
    -        }
             undoRegister();
     
             if (stopFuture != null) {
    --- End diff --
    
    pruningService.shutdown() itself has a 30 second timeout. So this future is 
guaranteed to return, and we don't need a timeout here. 


> Transaction Service sometimes does not shutdown
> -----------------------------------------------
>
>                 Key: TEPHRA-242
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-242
>             Project: Tephra
>          Issue Type: Bug
>          Components: manager
>    Affects Versions: 0.12.0-incubating
>            Reporter: Andreas Neumann
>            Assignee: Andreas Neumann
>             Fix For: 0.13.0-incubating
>
>
> If shutting down encounters an exception (for example, OutOfMemory), it can 
> happen that the process does not exit. We have observed this after an NPE 
> from DFS (closing the transaction log), the process stayed alive and the\ 
> prune thread (executor) was not shut down. It was not clear why the process 
> stayed alive, but it would certainly help to handle exceptions better in the 
> shutdown sequence. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to