[hibernate-dev] [Hibernate Search] session.flushToIndexes()
John Griffin
jgriffin at thebluezone.net
Sat Jun 21 13:38:07 EDT 2008
Since the flush time now becomes accessible programmatically this is a
better additional alternative to just the batch flush.
+1 to not triggering a Hibernate core flush.
+1 to the name. It says exactly what it does.
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: Saturday, June 21, 2008 10:00 AM
To: hibernate-dev at lists.jboss.org
Subject: hibernate-dev Digest, Vol 24, Issue 19
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. [Hibernate Search] session.flushToIndexes() (Emmanuel Bernard)
----------------------------------------------------------------------
Message: 1
Date: Sat, 21 Jun 2008 15:49:02 +0200
From: Emmanuel Bernard <emmanuel at hibernate.org>
Subject: [hibernate-dev] [Hibernate Search] session.flushToIndexes()
To: hibernate-dev at lists.jboss.org
Message-ID: <611FEB50-98B7-4BEE-B238-0A1168A07B9F at hibernate.org>
Content-Type: text/plain; charset="us-ascii"
I never liked the way we work around mass insertion and OOME today
hibernate.search.worker.batch_size has many drawbacks
- the value is not accessible programatically
- it applies to any operations regardless of mass indexing
- it is used 99% of the time in close conjunction with a % and
session.clear()
- the side effect is quite big as the index is "transactionally"
committed
To replace it, I introduced
session.flushToIndexes();
this method manually triggers changes in queue. It does not trigger an
hibernate core flush().
This seems more reasonable and will make the code safer.
WDYT? Better name?
--
Emmanuel Bernard
emmanuel at hibernate.org
http://in.relation.to
http://blog.emmanuelbernard.com
http://twitter.com/emmanuelbernard
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.jboss.org/pipermail/hibernate-dev/attachments/20080621/7f532233
/attachment-0001.html
------------------------------
_______________________________________________
hibernate-dev mailing list
hibernate-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
End of hibernate-dev Digest, Vol 24, Issue 19
*********************************************
More information about the hibernate-dev
mailing list