Author: kwall
Date: Tue Jan 26 10:01:44 2016
New Revision: 1726755

URL: http://svn.apache.org/viewvc?rev=1726755&view=rev
Log:
QPID-7021: [Java Broker] BDB backup - order the backup files to comply with 
JE's documentation

Modified:
    
qpid/java/trunk/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackup.java

Modified: 
qpid/java/trunk/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackup.java
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackup.java?rev=1726755&r1=1726754&r2=1726755&view=diff
==============================================================================
--- 
qpid/java/trunk/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackup.java
 (original)
+++ 
qpid/java/trunk/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackup.java
 Tue Jan 26 10:01:44 2016
@@ -26,6 +26,7 @@ import java.io.FileNotFoundException;
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.nio.file.Files;
+import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Properties;
@@ -244,13 +245,17 @@ public class BDBBackup
                         }
                     });
 
+            if (fileSet == null || fileSet.length == 0)
+            {
+                throw new StoreException("There are no BDB log files to backup 
in the '" + fromdir + "' directory.");
+            }
+
+            // The files must be copied in alphabetical order (numerical in 
effect)
+            Arrays.sort(fileSet);
+
             // Open them all for reading.
             fileInputStreams = new FileInputStream[fileSet.length];
 
-            if (fileSet.length == 0)
-            {
-                throw new StoreException("There are no BDB log files to backup 
in the " + fromdir + " directory.");
-            }
 
             for (int i = 0; i < fileSet.length; i++)
             {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to