[jboss-cvs] JBoss Messaging SVN: r3192 - trunk/src/main/org/jboss/messaging/core/impl/postoffice.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 16 15:13:54 EDT 2007


Author: timfox
Date: 2007-10-16 15:13:53 -0400 (Tue, 16 Oct 2007)
New Revision: 3192

Modified:
   trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-1113


Modified: trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2007-10-16 12:37:16 UTC (rev 3191)
+++ trunk/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java	2007-10-16 19:13:53 UTC (rev 3192)
@@ -2915,15 +2915,6 @@
             //maps when the other nodes detect failure
             removeBindingInMemory(binding.queue.getNodeID(), binding.queue.getName());
       		
-      		//Delete from storage
-      		deleteBindingFromStorage(queue);
-      	
-            log.debug(this + " deleted binding for " + queue.getName());
-
-            // Note we do not need to send an unbind request across the cluster - this is because
-            // when the node crashes a view change will hit the other nodes and that will cause
-            // all binding data for that node to be removed anyway.
-            
             //Find if there is a local queue with the same name
             
             Queue localQueue = null;
@@ -2950,7 +2941,24 @@
             	
             	throw new IllegalStateException("Cannot failover " + queue.getName() + " since it does not exist on this node. " + 
             			                          "You must deploy your clustered destinations on ALL nodes of the cluster");
-            }            
+            }    
+            
+      		//Delete from storage
+            
+            //Note we must do this *after* we have done any merge.
+            //This is because if we did it first, then the merge failed, we'd be left with the old channel deleted
+            //but the messages would have still be in the old channel
+            //meaning they would have disappeared from the users point of view and it would involve manual
+            //database intervention to correct it
+            //See http://jira.jboss.com/jira/browse/JBMESSAGING-1113
+            
+      		deleteBindingFromStorage(queue);
+      	
+            log.debug(this + " deleted binding for " + queue.getName());
+
+            // Note we do not need to send an unbind request across the cluster - this is because
+            // when the node crashes a view change will hit the other nodes and that will cause
+            // all binding data for that node to be removed anyway.            
          }
 
          log.debug(this + ": server side fail over is now complete");




More information about the jboss-cvs-commits mailing list