db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oyste...@apache.org
Subject svn commit: r634658 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/net/SocketConnection.java
Date Fri, 07 Mar 2008 13:06:08 GMT
Author: oysteing
Date: Fri Mar  7 05:06:08 2008
New Revision: 634658

URL: http://svn.apache.org/viewvc?rev=634658&view=rev
Log:
DERBY-3358: OOME at slave during replication
Make sure to reset objOutputStreamt in ReplicationMessageTransmit#writeObject before sending
the new object. This removes the old object references both on the transmitter and the receiver
side.
Contributed by Jorgen Loland.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/net/SocketConnection.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/net/SocketConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/net/SocketConnection.java?rev=634658&r1=634657&r2=634658&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/net/SocketConnection.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/net/SocketConnection.java
Fri Mar  7 05:06:08 2008
@@ -93,6 +93,8 @@
      *                     stream.
      */
     public void writeMessage(Object message) throws IOException {
+        // reset stream so that previously shipped objects can be gc'ed
+        objOutputStream.reset();
         objOutputStream.writeObject(message);
         //flush the stream to ensure that all the data that is part
         //of the message object is written and no data remains



Mime
View raw message