[Hibernate-JIRA] Created: (HSEARCH-598) MassIndexer freezes when pool size is too low
by I D (JIRA)
MassIndexer freezes when pool size is too low
---------------------------------------------
Key: HSEARCH-598
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-598
Project: Hibernate Search
Issue Type: Bug
Components: massindexer
Affects Versions: 3.2.1
Environment: Hibernate Core 3.5.4, PostgreSQL 8.4.4
Reporter: I D
In our application we use db connection pooling at the servlet container level - Jetty instantiates a com.mchange.v2.c3p0.ComboPooledDataSource. We've disabled Hibernate's connection pooling to avoid multiple connection pools.
Soon after starting to use MassIndexer we noticed that it SOMETIMES freezes during operation - startAndWait() just hangs indefinitely. After some experimentation, we realized that during this freeze the connection pool is maxed out and all the 15 connections (c3p0's default value for maxPoolSize is 15) are active.
We therefore experimented with various values for maxPoolSize and found that 10 or less always seems to cause freezes, whereas 20 or more seems to work fine consistently. In between is a grey area, where the freeze occurs inconsistently (this grey area may of course extend to maxPoolSize<=10 and/or maxPoolSize>=20, since our tests only provide a partial statistical sample).
If this is expected behavior, the minimal pool size / number of required connections should be well documented.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[Hibernate-JIRA] Created: (HSEARCH-383) Hibernate Search does not respect the @AccessType annotation in respect to @Id fields.
by Steven Knock (JIRA)
Hibernate Search does not respect the @AccessType annotation in respect to @Id fields.
--------------------------------------------------------------------------------------
Key: HSEARCH-383
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-383
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.1.1.GA, 3.1.0.GA
Environment: Hibernate 3.3.1.GA
Reporter: Steven Knock
Priority: Minor
Attachments: TestAccessTypeProblem.java
This occurs when indexing an Entity annotated as @IndexedEmbedded if the object that it is @ContainedIn is a proxy object that has not yet been loaded and if the @AccessType of the @Id of the proxy object has been overriden from field to property.
This is because Hibernate Search does not respect the @AccessType annotation, and so attempts to read the id of the parent object directly from the member variable, which is not initialised in the proxy and so returns 0 in the attached test case.
The problem is in:
org.hibernate.search.engine.DocumentBuilderIndexedEntity.checkDocumentId().
This results in a record in the Lucene index that has no reference to the containing instance. So, while the number of results is returned correctly, any attempt to actually retrieve the results and convert them into Hibernate objects fails.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[Hibernate-JIRA] Created: (HSEARCH-402) Provide a ReaderProvider to cap the number of index reopenings to a fixed rate
by Sanne Grinovero (JIRA)
Provide a ReaderProvider to cap the number of index reopenings to a fixed rate
------------------------------------------------------------------------------
Key: HSEARCH-402
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-402
Project: Hibernate Search
Issue Type: New Feature
Reporter: Sanne Grinovero
Assignee: Sanne Grinovero
Fix For: 3.2.0
It's often unneeded to recheck for an index update at very high frequency, which ends up to be a bottleneck in high-throughput applications
for an unneded guarantee of having latest version of index.
Setting a configurable period, let's say 5 seconds, will make this ReaderProvider reopen an IndexReader once each 5 seconds.
This can be done in background, removing the delay of checks from the call to openReader(); and enabling index warmup in future (Lucene 2.9 feature) in background.
When reopening in background the ratio will be fixed, i.e. the index will be reopened even if there's no request for a new IR.
This impl should manage the timer, but otherwise delegate to another implementation of ReaderProvider (defaulting to current default: SharingBufferReaderProvider) to optionally chain and provide the benefits of the other implementation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[Hibernate-JIRA] Created: (HHH-2844) Limit and 'For Update' do not work on Oracle
by Michael Kopp (JIRA)
Limit and 'For Update' do not work on Oracle
--------------------------------------------
Key: HHH-2844
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2844
Project: Hibernate3
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.2
Reporter: Michael Kopp
Limits on oracle lead too:
select * from (select x.y as xy_1 from table x) where rownum <= 5
when doing a for update that leads too
select * from (select x.y as xy_1 from table x) where rownum <= 5 for update of x.y
The problem is that the x.y is invalid and not found within the temporary view and leads to an oracle error.
what would be valid is the name of the view column xy_1, meaning
select * from (select x.y as xy_1 from table x) where rownum <= 5 for update of xy_1
Actually this should be valid in all cases when doing a alias for update lock.
My Solution thus was to override the following in my own Oracle Dialect
public String applyLocksToSql(final String sql, final Map aliasedLockModes, final Map keyColumnNames)
{
final String s = new ForUpdateFragment(this, aliasedLockModes, keyColumnNames)
{
@Override
public ForUpdateFragment addTableAlias(final String alias)
{
// search for alias in sql
final int i = sql.indexOf(alias);
// check if the found string is followed by an ' as ' and thus has a column alias
if (i != -1 && sql.length() > (i + alias.length() + 4) && sql.substring(i + alias.length(), i + alias.length() + 4).equals(
" as "))
{
// use the column alias
return super.addTableAlias(sql.substring(i + alias.length() + 4, sql.indexOf(',',i + alias.length() + 4)));
}
return super.addTableAlias(alias);
}
}.toFragmentString();
return sql + s;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[Hibernate-JIRA] Created: (HBX-939) Composite IDs and many-to-many relationships
by Markus Kramer (JIRA)
Composite IDs and many-to-many relationships
--------------------------------------------
Key: HBX-939
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-939
Project: Hibernate Tools
Issue Type: Bug
Affects Versions: 3.2beta9
Environment: Hibrnate 3.2.1, Postgresql 8.1.8
Reporter: Markus Kramer
Attachments: B.hbm.xml, testdb.sql
The detection of many-to-many relationships doesn't work correctly if the primary key of one of the involved tables consists of more than one field.
An example:
One of two tables (table 'A') of a many-to-many relationship has a primary key consisting of two attributes (id1 and id2).
The generated B.hbm.xml for the table 'B' contains this:
<set name="as" inverse="true" table="a_b">
<key>
<column name="b_id" not-null="true" />
</key>
<many-to-many entity-name="test.A">
<column name="a_id1" not-null="true" />
</many-to-many>
</set>
But there should be another entry for the referenced primary key:
<column name="a_id2" not-null="true" />
The SQL code for the used tables and the complete B.hbm.xml are attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[Hibernate-JIRA] Created: (HSEARCH-444) Search fails to start when core uses XML mappings making use of entity-name attribute
by Sanne Grinovero (JIRA)
Search fails to start when core uses XML mappings making use of entity-name attribute
-------------------------------------------------------------------------------------
Key: HSEARCH-444
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-444
Project: Hibernate Search
Issue Type: Bug
Components: mapping
Affects Versions: 3.1.0.GA
Reporter: Sanne Grinovero
Assignee: Emmanuel Bernard
Fix For: 3.2.0.Beta2
As described on forums: https://forum.hibernate.org/viewtopic.php?f=9&t=993687
classes mapped using XML on hibernate core, like
classes starting with:
<class name="com.mydomain.myapp.AnswerImpl" table="answer"
entity-name="Answer">
cause:
Caused by: java.lang.NullPointerException
at org.hibernate.search.cfg.SearchConfigurationFromHibernateCore.getClassMapping(SearchConfigurationFromHibernateCore.java:31)
at org.hibernate.search.store.DirectoryProviderFactory.getDirectoryProviderName(DirectoryProviderFactory.java:226)
at org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProviders(DirectoryProviderFactory.java:53)
at org.hibernate.search.impl.SearchFactoryImpl.initDocumentBuilders(SearchFactoryImpl.java:404)
at org.hibernate.search.impl.SearchFactoryImpl.<init>(SearchFactoryImpl.java:119)
at org.hibernate.search.event.ContextHolder.getOrBuildSearchFactory(ContextHolder.java:30)
at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:59)
at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
... 16 more
This was reported on 3.1.0.GA but I guess it affects all releases.
There's a "test WAR" in the forums, going to ask for a testcase.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months