7.3 pull replica with 7.2 tlog leader

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

7.3 pull replica with 7.2 tlog leader

Will Currie
Premise: During an upgrade I should be able to run a 7.3 pull replica
against a 7.2 tlog leader. Or vice versa.

Maybe I'm totally wrong in assuming that!

Assuming that's correct it looks like 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.

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

Thanks,
Will
Reply | Threaded
Open this post in threaded view
|

Re: 7.3 pull replica with 7.2 tlog leader

Mark Miller-3
Yeah, the project should never use built in serialization. I'd file a JIRA
issue. We should remove this when we can.

- Mark

On Sun, May 6, 2018 at 9:39 PM Will Currie <[hidden email]> wrote:

> Premise: During an upgrade I should be able to run a 7.3 pull replica
> against a 7.2 tlog leader. Or vice versa.
>
> Maybe I'm totally wrong in assuming that!
>
> Assuming that's correct it looks like 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.
>
> 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
>
> Thanks,
> Will
>
--
- Mark
about.me/markrmiller
Reply | Threaded
Open this post in threaded view
|

Re: 7.3 pull replica with 7.2 tlog leader

Will Currie
Thanks. Done. https://issues.apache.org/jira/browse/SOLR-12321

On Mon, May 7, 2018 at 12:56 PM, Mark Miller <[hidden email]> wrote:

> Yeah, the project should never use built in serialization. I'd file a JIRA
> issue. We should remove this when we can.
>
> - Mark
>
> On Sun, May 6, 2018 at 9:39 PM Will Currie <[hidden email]> wrote:
>
> > Premise: During an upgrade I should be able to run a 7.3 pull replica
> > against a 7.2 tlog leader. Or vice versa.
> >
> > Maybe I'm totally wrong in assuming that!
> >
> > Assuming that's correct it looks like 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.
> >
> > 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
> >
> > Thanks,
> > Will
> >
> --
> - Mark
> about.me/markrmiller
>