[ 
https://issues.apache.org/jira/browse/OAK-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14482778#comment-14482778
 ] 

Tommaso Teofili commented on OAK-2718:
--------------------------------------

bq. Enable the observer via OSGi config i.e. it should work only if configured

that could be done, but would make it possible to use persisted configurations 
for Solr index (OAK-2526) only upon configuration.

bq. Wrap the observor with BackgroundObserver. See fix done for OAK-2570 for 
similar issue

sure

{quote}
For proper fix (which might take some time) i.e. diff only selective part we 
can take approach similar to one in Lucene. The IndexTracker tracks which all 
Lucene index are in use and then diff is only performed for those paths. This 
keeps the diff logic short and precise.
{quote}

while working on OAK-2526 I had thought of such an approach however it would 
have meant reinventing / recreating kind of the same code you have been writing 
for the Lucene index, that would've required quite some changes in the way the 
Solr index works so I decided not to go that path. However I really think that 
we would really benefit from abstracting the generic part of the Lucene index 
in oak-core (definitions, aggregates, rules, etc.) to allow writing of 
implementation specific bits only for Lucene and Solr.
That would allow to reduce the amount of per index maintenance and eventually 
have generic features implemented once instead of having to code them for each 
implementation.
I am aware that this may require some time, but I think it's 100% worth the 
effort, at least for full text indexes.

> NodeStateSolrServersObserver performs complete diff synchronously causing 
> slowness in dispatch
> ----------------------------------------------------------------------------------------------
>
>                 Key: OAK-2718
>                 URL: https://issues.apache.org/jira/browse/OAK-2718
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: oak-solr
>            Reporter: Chetan Mehrotra
>            Assignee: Tommaso Teofili
>             Fix For: 1.2
>
>
> {{NodeStateSolrServersObserver}} is enabled by default and performs diff 
> synchronously. Further it performs complete diff which might take time and 
> would cause the dispatch thread to slowdown.
> This would cause issues at least with {{DocumentNodeStore}} as there the 
> dispatch is done as part of background read and that call is time sensitive.
> As a fix the diff should performed asynchronously and also be selective. A 
> similar fix was done for Lucene index as part of OAK-2570



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

Reply via email to