michaelsembwever commented on code in PR #3168:
URL: https://github.com/apache/cassandra/pull/3168#discussion_r1536822446


##########
src/java/org/apache/cassandra/schema/CompressionParams.java:
##########
@@ -514,12 +659,15 @@ public void serialize(CompressionParams parameters, 
DataOutputPlus out, int vers
                 out.writeUTF(entry.getValue());
             }
             out.writeInt(parameters.chunkLength());
-            out.writeInt(parameters.maxCompressedLength);
+            if (version >= MessagingService.VERSION_40)
+                out.writeInt(parameters.maxCompressedLength);
+            else
+                if (parameters.maxCompressedLength != Integer.MAX_VALUE)
+                    throw new UnsupportedOperationException("Cannot stream 
SSTables with uncompressed chunks to pre-4.0 nodes.");

Review Comment:
   we don't stream anything to pre-4.0 nodes ever anyway.
   go back to the `assert` approach IMHO.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to