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

micky.zf updated LUCENE-6110:
-----------------------------
    Description: 
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
    .....

  was:
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.


  DirectoryReader getReader(boolean applyAllDeletes) throws IOException 
    ensureOpen();
    poolReaders = true;
    DirectoryReader r = null;
    doBeforeFlush();
    boolean anySegmentFlushed = false;

    boolean success2 = false;
    try {
      synchronized (fullFlushLock) {   // this line code will be blocked!!!!
    .....

       Priority: Blocker  (was: Major)

> 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
>   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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to