db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r634586 - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/reference/ engine/org/apache/derby/iapi/services/property/ engine/org/apache/derby/impl/services/replication/ engine/org/apache/derby/impl/services/replication/buffer/ eng...
Date Fri, 07 Mar 2008 08:52:18 GMT
Author: kahatlen
Date: Fri Mar  7 00:52:16 2008
New Revision: 634586

URL: http://svn.apache.org/viewvc?rev=634586&view=rev
Log:
DERBY-3388: Improve message handling for replication messages to derby.log

Add timestamp to replication messages written to derby.log and
introduce the following configurable properties:

  * derby.replication.verbose -> true/false - replication messages are
    written to log

  * derby.replication.logBufferSize -> the size of the replication log
    buffers

  * derby.replication.minLogShippingInterval -> the shortest interval
    between two consecutive log shipments

  * derby.replication.maxLogShippingInterval -> the longest interval
    between two consecutive log shipments (a "soft" guarantee that the
    slave will not deviate more than this amount of millis from the
    master)

Contributed by Jørgen Løland <Jorgen.Loland@Sun.COM>.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Property.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/buffer/ReplicationLogBuffer.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/MasterController.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/slave/SlaveController.java
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Property.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Property.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Property.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/Property.java Fri Mar
 7 00:52:16 2008
@@ -728,6 +728,23 @@
 	
 	
 	/*
+	** Replication
+	*/
+
+	/** Property name for specifying the size of the replication log buffers */
+	public static final String REPLICATION_LOG_BUFFER_SIZE= "derby.replication.logBufferSize";
+
+	/** Property name for specifying the minimum log shipping interval*/
+	public static final String REPLICATION_MIN_SHIPPING_INTERVAL = "derby.replication.minLogShippingInterval";
+
+	/** Property name for specifying the maximum log shipping interval*/
+	public static final String REPLICATION_MAX_SHIPPING_INTERVAL = "derby.replication.maxLogShippingInterval";
+
+	/** Property name for specifying whether or not replication messages are
+	 * written to the log*/
+	public static final String REPLICATION_VERBOSE = "derby.replication.verbose";
+
+	/*
 	** Upgrade
 	*/
 	

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
Fri Mar  7 00:52:16 2008
@@ -334,16 +334,30 @@
 	/**
 		Get a system wide property as a boolean.
 
+		@param key The name of the system property
 		@return true of the property is set to 'true, TRUE', false otherwise
 	*/
 	public static boolean getSystemBoolean(String key) {
+		return getSystemBoolean(key, false);
+	}
 
-        String value = PropertyUtil.getSystemProperty(key);
+    /**
+     * Get a system wide property as a boolean.
+     *
+     * @param key The name of the system property
+     * @param defaultValue The value to use if the property has not been set
+     * @return return defaultValue if the property is not set, returns true if
+     *  the property is set to 'true, TRUE', returns false otherwise.
+     */
+    public static boolean getSystemBoolean(String key, boolean defaultValue) {
 
-		return( 
-            Boolean.valueOf(
-                (value != null ? value.trim() : value)).booleanValue());
-	}
+        String value = PropertyUtil.getSystemProperty(key);
+        if (value == null) {
+            return defaultValue;
+        } else {
+            return (Boolean.valueOf(value.trim()).booleanValue());
+        }
+    }
 
 	/**
 		Get a service wide property as a boolean.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java
Fri Mar  7 00:52:16 2008
@@ -22,36 +22,45 @@
 
 package org.apache.derby.impl.services.replication;
 
+import java.util.Date;
 import org.apache.derby.iapi.reference.MessageId;
+import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.error.ErrorStringBuilder;
 import org.apache.derby.iapi.services.monitor.Monitor;
+import org.apache.derby.iapi.services.property.PropertyUtil;
 
 public class ReplicationLogger {
 
     /** Whether or not to print log messages to derby.log. Defaults to
      * true, but can be set to false with derby property
-     * "derby.replication.logerrormessages=true"
+     * "derby.replication.verbose=false".
      */
-    // TODO: make this configurable through the aforementioned
-    // property
-    private static final boolean LOG_REPLICATION_MESSAGES = true;
+    private final boolean verbose;
 
+    /** The name of the replicated database */
+    private final String dbname;
+
+    public ReplicationLogger(String dbname) {
+        verbose = PropertyUtil.getSystemBoolean(Property.REPLICATION_VERBOSE,
+                                                true);
+        this.dbname = dbname;
+    }
 
     /**
      * Print error message and the stack trace of the throwable to the
-     * log (usually derby.log) provided that LOG_REPLICATION_MESSAGES
-     * is true. If LOG_REPLICATION_MESSAGES is false, nothing is
+     * log (usually derby.log) provided that verbose
+     * is true. If verbose is false, nothing is
      * logged.
      *
      * @param msgId The error message id
      * @param t Error trace starts from this error
-     * @param dbname The name of the replicated database
      */
-    public static void logError(String msgId, Throwable t, String dbname) {
+    public void logError(String msgId, Throwable t) {
 
-        if (LOG_REPLICATION_MESSAGES) {
+        if (verbose) {
 
-            Monitor.logTextMessage(MessageId.REPLICATION_ERROR_BEGIN);
+            Monitor.logTextMessage(MessageId.REPLICATION_ERROR_BEGIN,
+                                   new Date());
 
             if (msgId != null) {
                 Monitor.logTextMessage(msgId, dbname);
@@ -65,6 +74,31 @@
                 esb.reset();
             }
             Monitor.logTextMessage(MessageId.REPLICATION_ERROR_END);
+        }
+    }
+
+    /**
+     * Print a text to the log (usually derby.log), provided that
+     * verbose is true.
+     * @param text The text that will be logged
+     * @param writeHeader if true, encapsulates message in "begin
+     * error message" and "end error message" lines. If false,
+     * timestamps the text and writes it to the log without the header
+     * and footer.
+     */
+    public void logText(String text, boolean writeHeader) {
+
+        if (verbose) {
+            if (writeHeader) {
+                Monitor.logTextMessage(MessageId.REPLICATION_ERROR_BEGIN,
+                                       new Date());
+                Monitor.logMessage(text);
+                Monitor.logTextMessage(MessageId.REPLICATION_ERROR_END);
+            } else {
+                Monitor.
+                    logTextMessage(MessageId.REPLICATION_ONELINE_MSG_HEADER,
+                                   new Date(), text);
+            }
         }
     }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/buffer/ReplicationLogBuffer.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/buffer/ReplicationLogBuffer.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/buffer/ReplicationLogBuffer.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/buffer/ReplicationLogBuffer.java
Fri Mar  7 00:52:16 2008
@@ -62,7 +62,7 @@
 
 public class ReplicationLogBuffer {
 
-    private static final int DEFAULT_NUMBER_LOG_BUFFERS = 10;
+    public static final int DEFAULT_NUMBER_LOG_BUFFERS = 10;
 
     private final LinkedList dirtyBuffers;// LogBufferElements with unsent log
     private final LinkedList freeBuffers; // currently unused LogBufferElements

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
Fri Mar  7 00:52:16 2008
@@ -25,8 +25,12 @@
 import java.util.NoSuchElementException;
 
 import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.services.property.PropertyUtil;
+import org.apache.derby.iapi.services.sanity.SanityManager;
 
+import org.apache.derby.impl.services.replication.ReplicationLogger;
 import org.apache.derby.impl.services.replication.buffer.ReplicationLogBuffer;
 import org.apache.derby.impl.services.replication.net.ReplicationMessage;
 import org.apache.derby.impl.services.replication.net.ReplicationMessageTransmit;
@@ -68,6 +72,20 @@
      * Time interval (in milliseconds) at which the log shipping takes place.
      */
     private long shippingInterval;
+    /**
+     * Minimum interval (in milliseconds) between log shipping.
+     * Defaults to MIN, but can be configured using system property
+     * derby.replication.minLogShippingInterval
+     * @see MIN
+     */
+    private long minShippingInterval;
+    /**
+     * Minimum interval (in milliseconds) between log shipping.
+     * Defaults to MAX, but can be configured using system property
+     * derby.replication.maxLogShippingInterval
+     * @see MAX
+     */
+    private long maxShippingInterval;
     
     /**
      * Will store the time at which the last shipping happened. Will be used
@@ -128,6 +146,8 @@
      */
     private static final long MAX = 5000;
 
+    private final ReplicationLogger repLogger;
+
     /**
      * Constructor initializes the log buffer, the replication message
      * transmitter, the shipping interval and the master controller.
@@ -138,16 +158,23 @@
      *                    network transmission of retrieved log records.
      * @param masterController The master controller that initialized this log
      *                         shipper.
+     * @param repLogger The replication logger that will write messages to
+     * the log file (typically derby.log)
      */
     public AsynchronousLogShipper(ReplicationLogBuffer logBuffer,
-        ReplicationMessageTransmit transmitter,
-        MasterController masterController) {
+                                  ReplicationMessageTransmit transmitter,
+                                  MasterController masterController,
+                                  ReplicationLogger repLogger) {
         super("derby.master.logger-" + masterController.getDbName());
         this.logBuffer = logBuffer;
         this.transmitter = transmitter;
         this.masterController = masterController;
         this.stopShipping = false;
-        shippingInterval = MIN;
+        this.repLogger = repLogger;
+
+        getLogShipperProperties();
+        shippingInterval = minShippingInterval;
+
         lastShippingTime = System.currentTimeMillis();
     }
     
@@ -322,7 +349,8 @@
      * a) Get FI from log buffer
      * b) If FI >= FI_HIGH
      *     b.1) notify the log shipper thread.
-     * c) Else If the time elapsed since last ship is greater than MIN
+     * c) Else If the time elapsed since last ship is greater than
+     *    minShippingInterval
      *     c.1) notify the log shipper thread.
      */
     public void workToDo() {
@@ -332,7 +360,8 @@
         fi = logBuffer.getFillInformation();
         
         if (fi >= FI_HIGH || 
-                (System.currentTimeMillis() - lastShippingTime) > MIN) {
+                (System.currentTimeMillis() - lastShippingTime) >
+                 minShippingInterval) {
             synchronized (this) {
                 notify();
             }
@@ -345,8 +374,8 @@
      * steps to arrive at the shipping interval,
      * 
      * a) FI >= FI_HIGH return -1 (signifies that the waiting time should be 0)
-     * b) FI >  FI_LOW and FI < FI_HIGH return MIN
-     * c) FI <= FI_LOW return MAX.
+     * b) FI >  FI_LOW and FI < FI_HIGH return minShippingInterval
+     * c) FI <= FI_LOW return maxShippingInterval.
      * 
      * @return the shipping interval based on the fill information.
      */
@@ -362,11 +391,38 @@
         if (fi >= FI_HIGH) {
             si = -1;
         } else if (fi > FI_LOW && fi < FI_HIGH) {
-            si = MIN;
+            si = minShippingInterval;
         } else {
-            si = MAX;
+            si = maxShippingInterval;
         }
         
         return si;
+    }
+
+    /**
+     * Load relevant system properties: max and min log shipping interval
+     */
+    private void getLogShipperProperties() {
+        minShippingInterval = PropertyUtil.
+            getSystemInt(Property.REPLICATION_MIN_SHIPPING_INTERVAL, (int)MIN);
+        maxShippingInterval = PropertyUtil.
+            getSystemInt(Property.REPLICATION_MAX_SHIPPING_INTERVAL, (int)MAX);
+
+        // To guarantee a maximum log shipping delay,
+        // minShippingInterval cannot be higher than
+        // maxShippingInterval / #logbuffers. See javadoc for MAX
+        int buffers = logBuffer.DEFAULT_NUMBER_LOG_BUFFERS;
+        if (minShippingInterval > maxShippingInterval / buffers) {
+            minShippingInterval = maxShippingInterval / buffers;
+            if (SanityManager.DEBUG) {
+                repLogger.logText("Minimum log shipping " +
+                                  "interval too large to guarantee " +
+                                  "the current maximum interval (" +
+                                  maxShippingInterval +
+                                  "). New minimum interval: " +
+                                  minShippingInterval,
+                                  false);
+            }
+        }
     }
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/MasterController.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/MasterController.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/MasterController.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/MasterController.java
Fri Mar  7 00:52:16 2008
@@ -30,6 +30,9 @@
 import org.apache.derby.iapi.services.monitor.ModuleControl;
 import org.apache.derby.iapi.services.monitor.ModuleSupportable;
 import org.apache.derby.iapi.services.monitor.Monitor;
+import org.apache.derby.iapi.services.property.PropertyUtil;
+import org.apache.derby.iapi.services.sanity.SanityManager;
+import org.apache.derby.iapi.reference.Property;
 
 import org.apache.derby.iapi.store.raw.RawStoreFactory;
 import org.apache.derby.iapi.store.raw.log.LogFactory;
@@ -63,6 +66,8 @@
         implements MasterFactory, ModuleControl, ModuleSupportable {
 
     private static final int DEFAULT_LOG_BUFFER_SIZE = 32768; //32K
+    private static final int LOG_BUFFER_SIZE_MIN = 8192; //8KB
+    private static final int LOG_BUFFER_SIZE_MAX = 1024*1024; //1MB
 
     private RawStoreFactory rawStoreFactory;
     private DataFactory dataFactory;
@@ -70,11 +75,13 @@
     private ReplicationLogBuffer logBuffer;
     private AsynchronousLogShipper logShipper;
     private ReplicationMessageTransmit transmitter; 
+    private ReplicationLogger repLogger;
 
     private String replicationMode;
     private String slavehost;
     private int slaveport;
     private String dbname;
+    private int logBufferSize = 0;
     
     //Indicates whether the Master Controller is currently
     //active
@@ -196,7 +203,10 @@
         rawStoreFactory = rawStore;
         dataFactory = dataFac;
         logFactory = logFac;
-        logBuffer = new ReplicationLogBuffer(DEFAULT_LOG_BUFFER_SIZE, this);
+
+        repLogger = new ReplicationLogger(dbname);
+        getMasterProperties();
+        logBuffer = new ReplicationLogBuffer(logBufferSize, this);
 
         try {
             logFactory.startReplicationMasterRole(this);
@@ -208,14 +218,14 @@
             if (replicationMode.equals(MasterFactory.ASYNCHRONOUS_MODE)) {
                 logShipper = new AsynchronousLogShipper(logBuffer,
                                                         transmitter,
-                                                        this);
+                                                        this,
+                                                        repLogger);
                 ((Thread)logShipper).start();
             }
         } catch (StandardException se) {
             // cleanup everything that may have been started before
             // the exception was thrown
-            ReplicationLogger.logError(MessageId.REPLICATION_FATAL_ERROR, null,
-                                       dbname);
+            repLogger.logError(MessageId.REPLICATION_FATAL_ERROR, se);
             logFactory.stopReplicationMasterRole();
             teardownNetwork();
             throw se;
@@ -248,13 +258,11 @@
         try {
             logShipper.flushBuffer();
         } catch (IOException ioe) {
-            ReplicationLogger.
-                logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION,
-                         ioe, dbname);
+            repLogger.
+                logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION, ioe);
         } catch(StandardException se) {
-            ReplicationLogger.
-                logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION, 
-                         se, dbname);
+            repLogger.
+                logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION, se);
         } finally {
             teardownNetwork();
         }
@@ -331,6 +339,33 @@
            handleFailoverFailure(null);
         }
     }
+
+    /**
+     * Load relevant system property: replication log buffer size
+     */
+    private void getMasterProperties() {
+        logBufferSize =
+            PropertyUtil.getSystemInt(Property.REPLICATION_LOG_BUFFER_SIZE,
+                                      DEFAULT_LOG_BUFFER_SIZE);
+
+        if (logBufferSize < LOG_BUFFER_SIZE_MIN) {
+            logBufferSize = LOG_BUFFER_SIZE_MIN;
+            if (SanityManager.DEBUG) {
+                repLogger.logText("Replication log buffer size " +
+                                  "property too small. Set to " +
+                                  "minimum value: " + logBufferSize,
+                                  false);
+            }
+        }  else if (logBufferSize > LOG_BUFFER_SIZE_MAX) {
+            logBufferSize = LOG_BUFFER_SIZE_MAX;
+            if (SanityManager.DEBUG) {
+                repLogger.logText("Replication log buffer size " +
+                                  "property too big. Set to " +
+                                  "maximum value: " + logBufferSize,
+                                  false);
+            }
+        }
+    }
     
     /**
      * used to handle the case when an attempt to failover the database
@@ -462,9 +497,8 @@
      */
     void handleExceptions(Exception exception) {
         if (exception instanceof IOException) {
-            ReplicationLogger.
-                logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION, 
-                         exception, dbname);
+            repLogger.logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION,
+                               exception);
             Monitor.logTextMessage(MessageId.REPLICATION_MASTER_RECONN, dbname);
             
             while (active) {
@@ -507,15 +541,14 @@
      * @param t the throwable that needs to be handled.
      */
     private void printStackAndStopMaster(Throwable t) {
-        ReplicationLogger.
-            logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION, t, dbname);
+        repLogger.logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION, t);
         try {
             stopMaster();
         } catch (Throwable t_stopmaster) {
             //The stop master threw an exception saying the replication
             //has been stopped already.
-            ReplicationLogger.
-                logError(MessageId.REPLICATION_MASTER_STOPPED, t, dbname);
+            repLogger.
+                logError(MessageId.REPLICATION_MASTER_STOPPED, t);
         }
     }
     

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/slave/SlaveController.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/slave/SlaveController.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/slave/SlaveController.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/slave/SlaveController.java
Fri Mar  7 00:52:16 2008
@@ -74,6 +74,7 @@
     private RawStoreFactory rawStoreFactory;
     private LogToFile logToFile;
     private ReplicationMessageReceive receiver;
+    private ReplicationLogger repLogger;
 
     private volatile boolean connectedToMaster = false;
     private String slavehost;
@@ -138,6 +139,7 @@
         }
 
         dbname = properties.getProperty(SlaveFactory.SLAVE_DB);
+        repLogger = new ReplicationLogger(dbname);
     }
 
     /**
@@ -368,8 +370,7 @@
             return;
         }
 
-        ReplicationLogger.
-            logError(MessageId.REPLICATION_SLAVE_LOST_CONN, e, dbname);
+        repLogger.logError(MessageId.REPLICATION_SLAVE_LOST_CONN, e);
 
         try {
             while (!setupConnection()) {
@@ -428,15 +429,13 @@
             return;
         }
 
-        ReplicationLogger.
-            logError(MessageId.REPLICATION_FATAL_ERROR, e, dbname);
+        repLogger.logError(MessageId.REPLICATION_FATAL_ERROR, e);
 
         // todo: notify master of the problem
         try {
             stopSlave();
         } catch (StandardException se) {
-            ReplicationLogger.
-                logError(MessageId.REPLICATION_FATAL_ERROR, se, dbname);
+            repLogger.logError(MessageId.REPLICATION_FATAL_ERROR, se);
         }
     }
 
@@ -448,7 +447,7 @@
                 receiver = null;
             }
         } catch (IOException ioe) {
-            ReplicationLogger.logError(null, ioe, dbname);
+            repLogger.logError(null, ioe);
         }
     }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml Fri Mar  7 00:52:16
2008
@@ -7665,12 +7665,13 @@
             <title>Undocumented Replication Messages from MessageId.java</title>
             <msg>
                 <name>R001</name>
-                <text>--------  BEGIN REPLICATION ERROR MESSAGE ---------</text>
+                <text>----  BEGIN REPLICATION ERROR MESSAGE ({0}) ----</text>
+                <arg>timestamp</arg>
             </msg>
 
             <msg>
                 <name>R002</name>
-                <text>---------  END REPLICATION ERROR MESSAGE ----------</text>
+                <text>--------------------  END REPLICATION ERROR MESSAGE ---------------------</text>
             </msg>
 
             <msg>
@@ -7731,6 +7732,13 @@
             <msg>
                 <name>R012</name>
                 <text>Replication connection handle invalid.</text>
+            </msg>
+
+            <msg>
+                <name>R013</name>
+                <text>Replication message ({0}): {1}</text>
+                <arg>timestamp</arg>
+                <arg>message</arg>
             </msg>
             
             <msg>

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java?rev=634586&r1=634585&r2=634586&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java
Fri Mar  7 00:52:16 2008
@@ -190,6 +190,7 @@
     String REPLICATION_MASTER_RECONN                     = "R010";
     String REPLICATION_SLAVE_NETWORK_LISTEN              = "R011";    
     String REPLICATION_INVALID_CONNECTION_HANDLE         = "R012";
+    String REPLICATION_ONELINE_MSG_HEADER                = "R013";
     String REPLICATION_FAILOVER_SUCCESSFUL               = "R020";
 
 }



Mime
View raw message