You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2009/03/27 06:15:50 UTC

[jira] Created: (SOLR-1089) do write to Solr in a separate thread

do write to Solr in a separate thread
-------------------------------------

                 Key: SOLR-1089
                 URL: https://issues.apache.org/jira/browse/SOLR-1089
             Project: Solr
          Issue Type: Improvement
          Components: contrib - DataImportHandler
            Reporter: Noble Paul


import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-1089) do write to Solr in a separate thread

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul resolved SOLR-1089.
------------------------------

    Resolution: Duplicate

> do write to Solr in a separate thread
> -------------------------------------
>
>                 Key: SOLR-1089
>                 URL: https://issues.apache.org/jira/browse/SOLR-1089
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>         Attachments: SOLR-1089.patch, SOLR-1089.patch, SOLR-1089.patch
>
>
> import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1089) do write to Solr in a separate thread

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul updated SOLR-1089:
-----------------------------

    Attachment: SOLR-1089.patch

> do write to Solr in a separate thread
> -------------------------------------
>
>                 Key: SOLR-1089
>                 URL: https://issues.apache.org/jira/browse/SOLR-1089
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>         Attachments: SOLR-1089.patch, SOLR-1089.patch, SOLR-1089.patch
>
>
> import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1089) do write to Solr in a separate thread

Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693520#action_12693520 ] 

Lance Norskog commented on SOLR-1089:
-------------------------------------

The servlet spec used to ban creating background threads inside servlets. I can't find that in the 2.5 spec, but it is generally a bad idea.

http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html

There is a problem with the servlet.destroy() method: it should pause until the index update finishes. Servlet sessions can be persisted and reloaded by the servlet container. This is supported so that, for example, for migrating sessions across web servers to allow a login session to continue across server crashes. There is also some listener interface for when the web app is undeployed.

It is ok to break this rule, but please make it optional and not the default behavior. It is a land mine: it will almost certainly cause some weird problem on some servlet engine.

Lance

>From the 2.5 servlet spec:

SRV.2.3.4 End of Service
The servlet container is not required to keep a servlet loaded for any particular
period of time. A servlet instance may be kept active in a servlet container for a
period of milliseconds, for the lifetime of the servlet container (which could be a
number of days, months, or years), or any amount of time in between.
When the servlet container determines that a servlet should be removed from
service, it calls the destroy method of the Servlet interface to allow the servlet to
release any resources it is using and save any persistent state. For example, the
container may do this when it wants to conserve memory resources, or when it is
being shut down.
Before the servlet container calls the destroy method, it must allow any
threads that are currently running in the service method of the servlet to complete
execution, or exceed a server-defined time limit.

Once the destroy method is called on a servlet instance, the container may
not route other requests to that instance of the servlet. If the container needs to
enable the servlet again, it must do so with a new instance of the servlet's class.
After the destroy method completes, the servlet container must release the
servlet instance so that it is eligible for garbage collection.




> do write to Solr in a separate thread
> -------------------------------------
>
>                 Key: SOLR-1089
>                 URL: https://issues.apache.org/jira/browse/SOLR-1089
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>         Attachments: SOLR-1089.patch
>
>
> import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1089) do write to Solr in a separate thread

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul updated SOLR-1089:
-----------------------------

    Attachment: SOLR-1089.patch

untested patch

> do write to Solr in a separate thread
> -------------------------------------
>
>                 Key: SOLR-1089
>                 URL: https://issues.apache.org/jira/browse/SOLR-1089
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>         Attachments: SOLR-1089.patch
>
>
> import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SOLR-1089) do write to Solr in a separate thread

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul reassigned SOLR-1089:
--------------------------------

    Assignee: Noble Paul

> do write to Solr in a separate thread
> -------------------------------------
>
>                 Key: SOLR-1089
>                 URL: https://issues.apache.org/jira/browse/SOLR-1089
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>         Attachments: SOLR-1089.patch, SOLR-1089.patch, SOLR-1089.patch
>
>
> import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1089) do write to Solr in a separate thread

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693523#action_12693523 ] 

Noble Paul commented on SOLR-1089:
----------------------------------

DIH already does indexing in a separate thread. All the distributed searches are done in new threads. 

BTW Solr does not use Servlets. Solr uses a single Filter. So the Servlet lifecycle should not matter to us. 

> do write to Solr in a separate thread
> -------------------------------------
>
>                 Key: SOLR-1089
>                 URL: https://issues.apache.org/jira/browse/SOLR-1089
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>         Attachments: SOLR-1089.patch
>
>
> import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1089) do write to Solr in a separate thread

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul updated SOLR-1089:
-----------------------------

    Attachment: SOLR-1089.patch

synced with trunk . use a SingleThreadExecutor instead of a thread

> do write to Solr in a separate thread
> -------------------------------------
>
>                 Key: SOLR-1089
>                 URL: https://issues.apache.org/jira/browse/SOLR-1089
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>         Attachments: SOLR-1089.patch, SOLR-1089.patch
>
>
> import can be made faster if the write is done in a different thread

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.