Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-5043

hostname lookup in SystemInfoHandler should be refactored so it's possible to not block core (re)load for long periouds on misconfigured systems

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 6.4, 7.0
    • None
    • None

    Description

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

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

      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)

      Attachments

        1. SOLR-5043.patch
          3 kB
          Chris M. Hostetter
        2. SOLR-5043-lazy.patch
          2 kB
          Ramkumar Aiyengar
        3. SOLR-5043.patch
          3 kB
          Chris M. Hostetter

        Issue Links

          Activity

            People

              hossman Chris M. Hostetter
              hossman Chris M. Hostetter
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: