Solr
  1. Solr
  2. SOLR-5499

Real-time /get handler is required when using Solr Cloud

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.4, 4.5, 4.5.1
    • Fix Version/s: 4.7, 6.0
    • Component/s: documentation
    • Labels:
      None

      Description

      Noticed during some leadership election when we shutdown Solr nodes.
      Delving through the code it seems that PeerSync uses the /get handler (with some very ugly code explicitly creating an HTTP request by hand). If that isn't configured, then any election change will cause a full sync in ALL replicas for the shard in question.

      2013-11-25 06:35:39,766 INFO [main-EventThread] o.a.s.c.SyncStrategy [SyncStrategy.java:94] Sync replicas to http://xxxxx:xxx/solr/xxxx_shard74_replica1/
      2013-11-25 06:35:39,766 INFO [main-EventThread] o.a.s.u.PeerSync [PeerSync.java:186] PeerSync: core=xxx_shard74_replica1 u
      rl=http://xxxxxxx:xxxxx/solr START replicas=[http://xxxxxxx:xxxx/solr/xxx_shard74_replica2/, http://xxxx:xxx/sol
      r/xxx_shard74_replica3/] nUpdates=100
      2013-11-25 06:35:39,768 WARN [main-EventThread] o.a.s.u.PeerSync [PeerSync.java:321] PeerSync: core=xxx_shard74_replica1 u
      rl=http://xxx:xxx/solr  got a 404 from http://xxx:xxx/solr/xxx_shard74_replica2/, counting as success
      2013-11-25 06:35:39,769 INFO [main-EventThread] o.a.s.u.PeerSync [PeerSync.java:273] PeerSync: core=xxx_shard74_replica1 u
      rl=http://nsrchnj2:10650/solr DONE. sync succeeded
      2013-11-25 06:35:39,769 INFO [main-EventThread] o.a.s.c.SyncStrategy [SyncStrategy.java:134] Sync Success - now sync replicas to me
      2013-11-25 06:35:39,769 INFO [main-EventThread] o.a.s.c.SyncStrategy [SyncStrategy.java:191] http://xxx:xxx/solr/xxx_shard74_replica1/: try and ask http://xxx:xxx/solr/xxx_shard74_replica2/ to sync
      2013-11-25 06:35:39,771 ERROR [main-EventThread] o.a.s.c.SyncStrategy [SolrException.java:129] Sync request error: org.apache.solr.client.
      solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://xxx:xxx/solr/xxx_shard74_replica3 returned non ok 
      status:404, message:Not Found
      2013-11-25 06:35:39,771 INFO [main-EventThread] o.a.s.c.SyncStrategy [SyncStrategy.java:211] http://xxx:xxx/solr/xxx_shard74_replica1/: Sync failed - asking replica (http://xxx:xxx/solr/xxx_shard74_replica2/) to recover.
      

      The triggers here (for me) were the 404 response codes, but we should just make it clear in the docs that the /get handler is required and shouldn't be removed (if using Solr Cloud)

      1. SOLR-5499.patch
        3 kB
        Shalin Shekhar Mangar
      2. SOLR-5499.patch
        2 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Ramkumar Aiyengar added a comment -

        There is a precedent in CoreAdminHandler where the handler is registered in code rather than being left to configuration since it's needed by Solr cloud. Should the same be done for /get? (well, technically it's not necessary still but it does have it's repercussions..)

        Show
        Ramkumar Aiyengar added a comment - There is a precedent in CoreAdminHandler where the handler is registered in code rather than being left to configuration since it's needed by Solr cloud. Should the same be done for /get ? (well, technically it's not necessary still but it does have it's repercussions..)
        Hide
        Shalin Shekhar Mangar added a comment -

        Log a warning if Solr is running in cloud mode and RealTimeGetComponent is not registered at /get.

        WARNING: RealTimeGetHandler is not registered at /get. SolrCloud will always use full index replication instead of the more efficient PeerSync method.

        Show
        Shalin Shekhar Mangar added a comment - Log a warning if Solr is running in cloud mode and RealTimeGetComponent is not registered at /get. WARNING: RealTimeGetHandler is not registered at /get. SolrCloud will always use full index replication instead of the more efficient PeerSync method.
        Hide
        Shalin Shekhar Mangar added a comment -

        Added a hint in the PeerSync failure message logged on a 404 as well.

        Show
        Shalin Shekhar Mangar added a comment - Added a hint in the PeerSync failure message logged on a 404 as well.
        Hide
        ASF subversion and git services added a comment -

        Commit 1545554 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1545554 ]

        SOLR-5499: Log a warning if /get is not registered when using SolrCloud

        Show
        ASF subversion and git services added a comment - Commit 1545554 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1545554 ] SOLR-5499 : Log a warning if /get is not registered when using SolrCloud
        Hide
        ASF subversion and git services added a comment -

        Commit 1545557 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1545557 ]

        SOLR-5499: Log a warning if /get is not registered when using SolrCloud

        Show
        ASF subversion and git services added a comment - Commit 1545557 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1545557 ] SOLR-5499 : Log a warning if /get is not registered when using SolrCloud
        Hide
        Shalin Shekhar Mangar added a comment -

        I added a note on the Realtime Get page on the Solr Reference Guide:

        https://cwiki.apache.org/confluence/pages/diffpages.action?pageId=32604273&originalId=34842575

        Show
        Shalin Shekhar Mangar added a comment - I added a note on the Realtime Get page on the Solr Reference Guide: https://cwiki.apache.org/confluence/pages/diffpages.action?pageId=32604273&originalId=34842575
        Hide
        ASF subversion and git services added a comment -

        Commit 1546776 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1546776 ]

        SOLR-5499: Added a warning note in example solrconfig.xml against removing realtime get handler

        Show
        ASF subversion and git services added a comment - Commit 1546776 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1546776 ] SOLR-5499 : Added a warning note in example solrconfig.xml against removing realtime get handler
        Hide
        ASF subversion and git services added a comment -

        Commit 1546777 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1546777 ]

        SOLR-5499: Added a warning note in example solrconfig.xml against removing realtime get handler

        Show
        ASF subversion and git services added a comment - Commit 1546777 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1546777 ] SOLR-5499 : Added a warning note in example solrconfig.xml against removing realtime get handler
        Hide
        Shalin Shekhar Mangar added a comment -

        Thanks Daniel!

        Show
        Shalin Shekhar Mangar added a comment - Thanks Daniel!

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Daniel Collins
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development