lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LUCENE-6110) When call ' IndexWriter.getReader(IndexWriter) ' BLOCKED..
Date Thu, 09 Jun 2016 09:31:21 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-6110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Adrien Grand closed LUCENE-6110.
--------------------------------
    Resolution: Not A Problem

Reopening for every request is expected to be slow. You should use SearcherManager and periodically
reopen your index in a background thread by calling SearcherManager.maybeRefresh.

> When call ' IndexWriter.getReader(IndexWriter) '  BLOCKED..
> -----------------------------------------------------------
>
>                 Key: LUCENE-6110
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6110
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/codecs
>    Affects Versions: 4.10
>         Environment: Description:	CentOS release 6.5 (Final)
> Release:	6.5
> Codename:	Final
>            Reporter: micky.zf
>            Priority: Blocker
>              Labels: performance
>         Attachments: source.java
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> when the project start running (lt's a WebServer), First will build a IndexWriter object
 as single instance.
> then every got a request, the method will parse request,then build a    IndexReader .the
code seems like this.
> ....
> indexReader =  DirectoryReader.open(indexWriter, false);
> ...
> indexReader.close();
> return Data;
> the engine running, lt's okay. a fews days later, the Performance turnning down. use
jstack  shell command . got logs ,
> ......
> "qtp463777123-1058" prio=10 tid=0x00007f716c1a2800 nid=0xb1e1 waiting for monitor entry
[0x00007f6ec0d35000]
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:411)
>         - waiting to lock <0x0000000752035af8> (a java.lang.Object)
>         at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:112)
>         at 
> lt's just BLOCKED.
> In File indexWriter.java
>   DirectoryReader getReader(boolean applyAllDeletes) ... 
>      .....
>     doBeforeFlush();
>     boolean anySegmentFlushed = false;
>     boolean success2 = false;
>     try {
>     synchronized (fullFlushLock) {   // this line code will be blocked!!!! line code
number 411
>     .....



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message