[hibernate-dev] RE: scrollableresult OOM problem

Emmanuel Bernard emmanuel at hibernate.org
Mon Nov 24 15:04:26 EST 2008


The JDBC driver is not involved. We don't use JDBC's scrollable result  
set.

On  Nov 24, 2008, at 14:47, Sanne Grinovero wrote:

> thanks John,
> hope your back is getting better.
> I've asked for more information to the reporter.
> I am not expecting the JDBC driver to do the sort, it is a Lucene  
> sort, so as
> you said it must be Search's code to keep something around.
> Maybe we are ignoring the FORWARD_ONLY.
>
> 2008/11/24 John Griffin <jgriffin at thebluezone.net>:
>> I've dealt with this problem but only from an Oracle perspective.  
>> Using a
>> FORWARD_ONLY ScrollMode only allows the rs.next() method call. Any  
>> other
>> result set record movement method call results in an exception.  
>> This allows
>> JDBC to fetch x amount of records (set by fetch size) and then get  
>> the next
>> fetch size etc. This prevents caching of previously fetched records  
>> (causing
>> OOM with large result sets).
>>       Since it is my understanding that Oracle sorts results and  
>> generates
>> a cursor on the server side, if this really is a problem, somewhere  
>> in the
>> code we are caching results.
>>       The only way I have been able to scroll extremely large  
>> results is
>> to implement paging. This does not imply that there is state  
>> maintained. An
>> array of record pointers can do it and there are probably more ways.
>>
>> I have no way to test this at home and I'm here all week.
>>
>> My two cents.
>>
>> John G.
>>
>>
>> -----Original Message-----
>> From: hibernate-dev-bounces at lists.jboss.org
>> [mailto:hibernate-dev-bounces at lists.jboss.org] On Behalf Of
>> hibernate-dev-request at lists.jboss.org
>> Sent: Monday, November 24, 2008 10:00 AM
>> To: hibernate-dev at lists.jboss.org
>> Subject: hibernate-dev Digest, Vol 29, Issue 16
>>
>> Send hibernate-dev mailing list submissions to
>>       hibernate-dev at lists.jboss.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>       https://lists.jboss.org/mailman/listinfo/hibernate-dev
>> or, via email, send a message with subject or body 'help' to
>>       hibernate-dev-request at lists.jboss.org
>>
>> You can reach the person managing the list at
>>       hibernate-dev-owner at lists.jboss.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of hibernate-dev digest..."
>>
>>
>> Today's Topics:
>>
>>  1. interesting issues in the forum (Sanne Grinovero)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 24 Nov 2008 17:17:58 +0100
>> From: "Sanne Grinovero" <sanne.grinovero at gmail.com>
>> Subject: [hibernate-dev] interesting issues in the forum
>> To: "Hardy Ferentschik" <hibernate at ferentschik.de>
>> Cc: Hibernate Dev <hibernate-dev at lists.jboss.org>
>> Message-ID:
>>       <50e5f6250811240817qf3a9f0v84c40b5ae771e3d0 at mail.gmail.com>
>> Content-Type: text/plain; charset=UTF-8
>>
>> hi Hardy,
>> I've been browsing the forums today and found these topics of  
>> interest,
>> they could be quite important bugs we should fix:
>>
>> not working correctly with Spring (needs some test, I don't trust  
>> this
>> report 100%)
>> http://forum.hibernate.org/viewtopic.php?t=988828
>>
>> memory leak on redeploy (quite good information here, but this is
>> going to be hard)
>> http://forum.hibernate.org/viewtopic.php?p=2400319
>>
>> sort + scrollableresult appears to load all in memory (never happened
>> to me, needs a test)
>> http://forum.hibernate.org/viewtopic.php?t=992342
>>
>> I never used Spring, so can't help there.
>> I have no idea about how to solve the ThreadLocal problem: this has  
>> to do
>> with
>> how Hibernate registers eventlisteners and we probably should ask for
>> changes there
>> Nnot sure if we can change the EM listeners without changing the  
>> spec??
>> I'm absolutely no expert on other Hibernate modules.
>>
>> I could try to reproduce the scrollableresult problem, but not this  
>> week.
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>>
>> End of hibernate-dev Digest, Vol 29, Issue 16
>> *********************************************
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev




More information about the hibernate-dev mailing list