Recently, we need to add a property in ShuffleHeader class. And there were a problem that client&server may not compatible because of serialization/deserialization when we were rolling update NodeManager instance.
To solve the problem, we made an improvement to help shuffle header version upgrade smoothly.
In HeaderVersion class, shuffle client uses targetVersion(eg 1.2.0) to negotiate with shuffle server. In that case, shuffle server has three cases:
- shuffle server does not have the newest code which is able to support version chosen, and we have to use defaultVersion(eg 1.0.0) instead*.*
- shuffle server can support older version(eg 1.1.0), then it can reply to shuffle client with compatibleVersion(eg 1.1.0), and finally, client and server can use the same version.
- shuffle server can support older version(eg 1.3.0), then it can reply to shuffle client with compatibleVersion(eg 1.2.0), and finally, client and server can use the same version.
Then, client and server can serialize&deserialize property using the available version.