You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Nicky Sandhu (JIRA)" <ji...@apache.org> on 2007/09/19 00:39:22 UTC

[jira] Commented: (AMQ-1428) Slave dies in master broker shared file system by leaking control.dat resource

    [ https://issues.apache.org/activemq/browse/AMQ-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40143 ] 

Nicky Sandhu commented on AMQ-1428:
-----------------------------------

Index: C:/backyard/activeio/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java
===================================================================
--- C:/backyard/activeio/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java	(revision 576974)
+++ C:/backyard/activeio/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java	(working copy)
@@ -27,6 +27,7 @@
 import java.text.NumberFormat;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activeio.adapter.PacketOutputStream;
 import org.apache.activeio.adapter.PacketToInputStream;
@@ -35,8 +36,6 @@
 import org.apache.activeio.packet.ByteBufferPacket;
 import org.apache.activeio.packet.Packet;
 
-import java.util.concurrent.atomic.AtomicInteger;
-
 /**
  * Provides a logical view of many separate files as one single long log file.
  * The separate files that compose the LogFile are Segments of the LogFile.
@@ -100,7 +99,14 @@
         this.logDirectory = logDirectory;
         this.onlineLogFileCount = onlineLogFileCount;
         this.initialLogFileSize = initialLogFileSize;
-        initialize(onlineLogFileCount);
+        try{
+            initialize(onlineLogFileCount);
+        }catch(JournalLockedException lockException){
+            if (controlFile != null){
+                controlFile.dispose();
+            }
+            throw lockException;
+        }
         this.archiveDirectory=archiveDirectory;
     }
 


> Slave dies in master broker shared file system by leaking control.dat resource
> ------------------------------------------------------------------------------
>
>                 Key: AMQ-1428
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1428
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.0.0
>            Reporter: Nicky Sandhu
>
> activeio leaks handles by not cleaning up on JournalLockedException when control.dat is attempted to be locked but fails

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.