db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: svn commit: r634658 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/net/SocketConnection.java
Date Fri, 07 Mar 2008 13:16:55 GMT
oysteing@apache.org writes:

> 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

Isn't this DERBY-3497?

>      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

Wouldn't it be better to call reset after writeObject() (and before
flush())? That would allow both the sender and the receiver to reclaim
the memory earlier.

-- 
Knut Anders

Mime
View raw message