Browse Source

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.
Jason Tedor 8 years ago
parent
commit
190da14bfe

+ 1 - 1
core/src/main/java/org/elasticsearch/action/resync/ResyncReplicationRequest.java

@@ -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);