activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicky Sandhu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1428) Slave dies in master broker shared file system by leaking control.dat resource
Date Tue, 18 Sep 2007 22:39:22 GMT

    [ 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.


Mime
View raw message