Bug 781008 (SOA-3486) - Access to repository is blocked after fulltext search
Summary: Access to repository is blocked after fulltext search
Keywords:
Status: VERIFIED
Alias: SOA-3486
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.2.0.ER4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 5.3.0 GA
Assignee: Jorge Perez Bolano
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-14 09:56 UTC by Jiri Pechanec
Modified: 2020-10-20 21:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An error occurred when a full text search was performed in the default EDS repository. Access to the repository became blocked after performing these searches. The cause of the problem was the explicit synchronization around the Lucene search processor and engine. This has now been rectified and full text searches can be performed without the repository locking up.
Clone Of:
Environment:
Fedora 14, PostgreSQL
Last Closed:
Type: Bug


Attachments (Terms of Use)
modeshape-fts.tar (10.00 KB, application/x-tar)
2011-10-14 09:57 UTC, Jiri Pechanec
no flags Details
modeshape-soa-3486-patch.jar (65.51 KB, application/java-archive)
2011-10-17 13:59 UTC, Randall Hauch
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker MODE-1279 0 Critical Closed Access to repository is blocked after fulltext search 2013-10-24 09:20:48 UTC
Red Hat Issue Tracker SOA-3486 0 Critical Closed Access to repository is blocked after fulltext search 2012-07-16 22:31:17 UTC

Description Jiri Pechanec 2011-10-14 09:56:49 UTC
project_key: SOA

I am running a simple test that does fulltext search in the default EDS repository.

The code is executed inside the container. For the first time the test passes without any issues. If test is executed for the second time then it blocks indefinitely when in tries to access repository.

There is no such issue with other searches supported with ModeShape.

The log file contains
First run
11:53:27,940 INFO  [STDOUT] [TestNG] Running:
  InContainer
11:53:27,954 INFO  [STDOUT] Retrieving server repository: eds
11:53:28,363 INFO  [STDOUT] Retrieving server repository: eds
11:53:28,469 INFO  [STDOUT] /queryNode {query_property=testvalue, jcr:primaryType=nt:unstructured, }
11:53:28,480 INFO  [STDOUT]
===============================================
InContainer
Total tests run: 1, Failures: 0, Skips: 0
===============================================

Second run
11:53:35,802 INFO  [STDOUT] [TestNG] Running:
  InContainer
11:53:35,802 INFO  [STDOUT] Retrieving server repository: eds



The code is attached, configuration file is pristine SOA-P.

Comment 1 Jiri Pechanec 2011-10-14 09:57:17 UTC
Attachment: Added: modeshape-fts.tar


Comment 2 Van Halbert 2011-10-17 12:49:36 UTC
Link: Added: This issue Cloned to SOA-3491


Comment 3 Randall Hauch 2011-10-17 13:10:59 UTC
Link: Added: This issue Cloned to SOA-3492


Comment 4 Randall Hauch 2011-10-17 13:14:54 UTC
Link: Removed: This issue Cloned to MODE-1280 


Comment 5 Randall Hauch 2011-10-17 13:59:08 UTC
Attached a proposed (and as of yet untested) patch JAR that can be applied to ER5. As noted in MODE-1279 (the project issue), a unit test was created to replicate this issue, and the proposed fix does make that unit test pass. This JAR is based upon those changes.

Comment 6 Randall Hauch 2011-10-17 13:59:08 UTC
Attachment: Added: modeshape-soa-3486-patch.jar


Comment 7 Anne-Louise Tangring 2011-10-25 13:49:02 UTC
Not easily reporduced. Not in 5.2

Comment 8 Len DiMaggio 2011-10-25 13:55:30 UTC
Jirka - can you confirm that to recreate this bug you simply run the fulltext search twice?  Thx!

Comment 9 Jiri Pechanec 2011-10-26 07:03:46 UTC
As you can see in the description -it is very easy to reproduce. It is enough to call search twice.

Comment 10 Jiri Pechanec 2011-10-26 07:54:18 UTC
I tried the patch and I can confirm that the issue is fixed.

Comment 12 JBoss JIRA Server 2012-02-13 15:36:59 UTC
Horia Chiorean <hchiorea> made a comment on jira MODE-1279

Fixed repository blocking after performing a full-text search multiple times. The cause of the problem was the explicit synchronization around the Lucene search processor and engine.

The fix was part of the https://github.com/ModeShape/modeshape/pull/207 pull request, which basically removed explicit synchronization around the LuceneSearchProcessor and Engine.

In addition:
* the Lucene version was updated from 3.1.0 to 3.4.0
* the LuceneSearchSession was updated to avoid the possible loss of content when indexing the same content in the same workspace from multiple threads

Run both the unit tests and integration tests a couple of time without any "apparent" deadlock.

Comment 13 JBoss JIRA Server 2012-02-13 15:38:20 UTC
Horia Chiorean <hchiorea> made a comment on jira MODE-1279

Fixed repository blocking after performing a full-text search multiple times. The cause of the problem was the explicit synchronization around the Lucene search processor and engine.

The fix was part of the https://github.com/ModeShape/modeshape/pull/207 pull request, which basically removed explicit synchronization around the LuceneSearchProcessor and Engine.

In addition:
* the Lucene version was updated from 3.1.0 to 3.4.0
* the LuceneSearchSession was updated to avoid the possible loss of content when indexing the same content in the same workspace from multiple threads. Lucene's IndexWriter class maintains internally a write lock, so using multiple IndexWriter instances concurrenty, for the same dir, couldn't work.

Ran both the unit tests and integration tests a couple of time without any "apparent" deadlock.

Comment 14 JBoss JIRA Server 2012-02-13 15:38:49 UTC
Horia Chiorean <hchiorea> made a comment on jira MODE-1279

Fixed repository blocking after performing a full-text search multiple times. The cause of the problem was the explicit synchronization around the Lucene search processor and engine.

The fix was part of the https://github.com/ModeShape/modeshape/pull/207 pull request, which basically removed explicit synchronization around the LuceneSearchProcessor and Engine.

In addition:
* the Lucene version was updated from 3.1.0 to 3.4.0
* the LuceneSearchSession was updated to avoid the possible loss of content when indexing the same content in the same workspace from multiple threads. Lucene's IndexWriter class maintains internally a write lock, so using multiple IndexWriter instances concurrenty, for the same dir, couldn't work.

Ran both the unit tests and integration tests a couple of times without any "apparent" deadlock.

Comment 15 JBoss JIRA Server 2012-02-14 16:51:48 UTC
Randall Hauch <rhauch> made a comment on jira MODE-1279

Merged into the 'master' branch.

Comment 16 Horia Chiorean 2012-02-15 09:11:04 UTC
Issue has been fixed in 2.8

Comment 17 Suz 2012-06-13 07:28:50 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
An error occurred when a full text search was performed in the default EDS repository. Access to the repository became blocked after performing these searches. The cause of the problem was the explicit synchronization around the Lucene search processor and engine. This has now been rectified and full text searches can be performed without the repository locking up.

Comment 18 Jiri Pechanec 2012-07-12 07:27:40 UTC
Verified in ER5

Comment 19 JBoss JIRA Server 2013-10-24 09:20:49 UTC
Randall Hauch <rhauch> updated the status of jira MODE-1279 to Closed


Note You need to log in before you can comment on or make changes to this bug.