You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2009/04/11 02:57:20 UTC

svn commit: r764128 - in /qpid/branches/0.5-release/qpid/java: ./ broker/src/main/java/org/apache/qpid/server/queue/ systests/src/main/java/org/apache/qpid/test/unit/close/

Author: ritchiem
Date: Sat Apr 11 00:57:19 2009
New Revision: 764128

URL: http://svn.apache.org/viewvc?rev=764128&view=rev
Log:
QPID-1806 : Ensure Flow to disk location is deleted when the queue is closed
    Note: As our queues do not stop processing on the close() call it is possible that the backing store may not beable to be deleted. In this case all that
will occur is that it will log the failure to disk so an operations team can manually clean it up. When we improve the Queueing model for AMQP 1-0 we can address this behaviour.
merged fro trunk r764095

Added:
    qpid/branches/0.5-release/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/close/FlowToDiskBackingQueueDeleteTest.java
      - copied unchanged from r764095, qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/close/FlowToDiskBackingQueueDeleteTest.java
Modified:
    qpid/branches/0.5-release/qpid/java/010ExcludeList
    qpid/branches/0.5-release/qpid/java/08ExcludeList-nonvm
    qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java
    qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java

Modified: qpid/branches/0.5-release/qpid/java/010ExcludeList
URL: http://svn.apache.org/viewvc/qpid/branches/0.5-release/qpid/java/010ExcludeList?rev=764128&r1=764127&r2=764128&view=diff
==============================================================================
--- qpid/branches/0.5-release/qpid/java/010ExcludeList (original)
+++ qpid/branches/0.5-release/qpid/java/010ExcludeList Sat Apr 11 00:57:19 2009
@@ -60,3 +60,7 @@
 org.apache.qpid.server.queue.TimeToLiveTest#*
 // QPID-1727 , QPID-1726 :c++ broker does not support flow to disk on transient queues. Also it requries a persistent store impl. for Apache
 org.apache.qpid.test.client.QueueBrowsingFlowToDiskTest#*
+
+// This test currently does not pick up the runtime location of the nonVm queueBacking store.
+org.apache.qpid.test.unit.client.close.FlowToDiskBackingQueueDeleteTest#*
+

Modified: qpid/branches/0.5-release/qpid/java/08ExcludeList-nonvm
URL: http://svn.apache.org/viewvc/qpid/branches/0.5-release/qpid/java/08ExcludeList-nonvm?rev=764128&r1=764127&r2=764128&view=diff
==============================================================================
--- qpid/branches/0.5-release/qpid/java/08ExcludeList-nonvm (original)
+++ qpid/branches/0.5-release/qpid/java/08ExcludeList-nonvm Sat Apr 11 00:57:19 2009
@@ -28,3 +28,7 @@
 // Those tests are written against the 0.10 path
 org.apache.qpid.test.unit.message.UTF8Test#*
 org.apache.qpid.client.MessageListenerTest#testSynchronousRecieveNoWait
+
+// This test currently does not pick up the runtime location of the nonVm queueBacking store.
+org.apache.qpid.test.unit.client.close.FlowToDiskBackingQueueDeleteTest#*
+

Modified: qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java?rev=764128&r1=764127&r2=764128&view=diff
==============================================================================
--- qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java (original)
+++ qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStore.java Sat Apr 11 00:57:19 2009
@@ -344,7 +344,11 @@
         _log.info("Closing Backing store at:" + _flowToDiskLocation);
         if (!FileUtils.delete(new File(_flowToDiskLocation), true))
         {
-            _log.error("Unable to fully delete backing store location");
+            // Attempting a second time appears to ensure that it is deleted.
+            if (!FileUtils.delete(new File(_flowToDiskLocation), true))
+            {
+                _log.error("Unable to fully delete backing store location");
+            }
         }
     }
 

Modified: qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java?rev=764128&r1=764127&r2=764128&view=diff
==============================================================================
--- qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java (original)
+++ qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/FileQueueBackingStoreFactory.java Sat Apr 11 00:57:19 2009
@@ -33,7 +33,7 @@
     private static final Logger _log = Logger.getLogger(FileQueueBackingStoreFactory.class);
 
     private String _flowToDiskLocation;
-    private static final String QUEUE_BACKING_DIR = "queueBacking";
+    public static final String QUEUE_BACKING_DIR = "queueBacking";
 
     public void configure(VirtualHost virtualHost, VirtualHostConfiguration config) throws ConfigurationException
     {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org