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

Use of builtin java serialization for admin response breaks 7.3 compatibility


    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.3, 7.3.1
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:


      Premise: During an upgrade I should be able to run a 7.3 pull replica against a 7.2 tlog leader. Or vice versa.
      Adding a new method[1] to SolrResponse has broken binary compatibility. When I try to register a new pull replica using the admin api[2] I get an HTTP 500 responseI see this error logged: java.io.InvalidClassException: org.apache.solr.client.solrj.SolrResponse; local class incompatible: stream classdesc serialVersionUID = 3945300637328478755, local class serialVersionUID = -793110010336024264
      The replica actually seems to register ok it just can't read the response because the bytes from the 7.2 leader include a different serialVersionUID. 
      Should SolrResponse include a serialVersionIUID? All subclasses too.
      Mark Miller's advice is that the project should never use builtin java serialization.
      It looks like stock java serialization is only used for these admin responses. Query responses use JavaBinCodec instead..
      Full(ish) stack trace:

      ERROR HttpSolrCall null:org.apache.solr.common.SolrException: java.io.InvalidClassException: org.apache.solr.client.solrj.SolrResponse; local class incompatible: st
      ream classdesc serialVersionUID = 3945300637328478755, local class serialVersionUID = -7931100103360242645
          at org.apache.solr.client.solrj.SolrResponse.deserialize(SolrResponse.java:73)
          at org.apache.solr.handler.admin.CollectionsHandler.sendToOCPQueue(CollectionsHandler.java:348)
          at org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:256)
          at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:230)
          at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:195)
          at org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:736)
          at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:717)
          at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:498)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:384)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:330)

      [1] https://github.com/apache/lucene-solr/commit/5ce83237e804ac1130eaf5cf793955667793fee0#diff-b809fa594f93aa6805381029a188e4e2R46
      [2] http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=blah&shard=shard1&node=blah&type=pull


          Issue Links



              • Assignee:
                wcurrie Will Currie
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created: