andywebb1975 commented on a change in pull request #1210: SOLR-14219 force serialVersionUID of OverseerSolrResponse URL: https://github.com/apache/lucene-solr/pull/1210#discussion_r371411317
########## File path: solr/core/src/java/org/apache/solr/cloud/OverseerSolrResponse.java ########## @@ -26,7 +26,9 @@ import java.util.Objects; public class OverseerSolrResponse extends SolrResponse { - + + private static final long serialVersionUID = 4721653044098960880L; Review comment: hi Tomas, that's my understanding too - and it's possible that people may be running builds of earlier Solr versions whose serialVersionUID for this class differ from 472165... . I've some (slightly shaky!) evidence in support of doing it this way: in https://github.com/apache/lucene-solr/pull/1140 for SOLR-14165 I saw that the same earlier UID for SolrResponse had been generated by several different stacks, but it's possible the stacks weren't sufficiently different. Also I can see about a dozen instances of serialVersionUID being set to explicit values (other than 1) in the Lucene/Solr codebase, presumably for reasons similar to the current one - though to be fair I've no way to tell if these have caused compatibility issues with custom builds in the past. I do think that serialVersionUID should be set explicitly for all serializable classes, and that setting it to the value used in the earlier official release builds is the best value to use when it's being set retrospectively like this. In the interests of finding other approaches to making the serialization vs javabin change backwards-compatible, I've just run a build that didn't set serialVersionUID explicitly but made useUnsafeSerialization and useUnsafeDeserialization private, to see if this would give me the same default UID as before. It didn't - I got a third value -550706... instead. So as far as I can see the only options here are to remove all the changes from OverseerSolrResponse and put them elsewhere as you describe above, or to set its serialVersionUID to a possibly-incompatible value as I've done in this PR. hope this helps! Andy ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org