You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ramkumar Aiyengar (JIRA)" <ji...@apache.org> on 2015/08/15 22:50:45 UTC

[jira] [Commented] (SOLR-5043) hostanme lookup in SystemInfoHandler should be refactored to not block core (re)load

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

Ramkumar Aiyengar commented on SOLR-5043:
-----------------------------------------

Having this on a per-instance basis like it does currently would also mean that you have one more thread running per core, even if temporarily, that might cause issues if you have lots of cores starting up at the same time in a JVM.

Is it a big deal to just do this lazily and synchronously the first time the handler is requested? I know it just moves the delay elsewhere, but on the flip side, with this patch, you might sometimes not get the hostname when you expect it (so technically it's a functional difference)

> hostanme lookup in SystemInfoHandler should be refactored to not block core (re)load
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-5043
>                 URL: https://issues.apache.org/jira/browse/SOLR-5043
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments: SOLR-5043.patch
>
>
> SystemInfoHandler currently lookups the hostname of the machine on it's init, and caches for it's lifecycle -- there is a comment to the effect that the reason for this is because on some machines (notably ones with wacky DNS settings) looking up the hostname can take a long ass time in some JVMs...
> {noformat}
>   // on some platforms, resolving canonical hostname can cause the thread
>   // to block for several seconds if nameservices aren't available
>   // so resolve this once per handler instance 
>   //(ie: not static, so core reload will refresh)
> {noformat}
> But as we move forward with a lot more multi-core, solr-cloud, dynamically updated instances, even paying this cost per core-reload is expensive.
> we should refactoring this so that SystemInfoHandler instances init immediately, with some kind of lazy loading of the hostname info in a background thread, (especially since hte only real point of having that info here is for UI use so you cna keep track of what machine you are looking at)



--
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