Move resync request serialization assertion

This commit moves an assertion that some guard code that will eventually
be dead code in the resync replication request read serialization is
removed when the master branch is bumped to version 8.0.0.
This commit is contained in:
Jason Tedor 2017-11-20 20:59:41 -05:00
parent 28660be40a
commit 190da14bfe
1 changed files with 1 additions and 1 deletions

View File

@ -50,13 +50,13 @@ public final class ResyncReplicationRequest extends ReplicatedWriteRequest<Resyn
@Override
public void readFrom(final StreamInput in) throws IOException {
assert Version.CURRENT.major <= 7;
if (in.getVersion().equals(Version.V_6_0_0)) {
/*
* Resync replication request serialization was broken in 6.0.0 due to the elements of the stream not being prefixed with a
* byte indicating the type of the operation.
*/
// TODO: remove this check in 8.0.0 which provides no BWC guarantees with 6.x.
assert Version.CURRENT.major <= 7;
throw new IllegalStateException("resync replication request serialization is broken in 6.0.0");
}
super.readFrom(in);