mirror of https://github.com/apache/cassandra
Fix rejectSubsequentInProgressSequence test: cap message sizes for commit failures
Patch by Alex Petrov; reviewed by Sam Tunnicliffe for CASSANDRA-19076.
This commit is contained in:
parent
f4c969adfc
commit
e0766e95bc
|
|
@ -187,7 +187,8 @@ public class Commit
|
|||
if (message == null)
|
||||
message = "";
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
// TypeSizes#sizeOf encoder only allows strings that are up to Short.MAX_VALUE bytes large
|
||||
this.message = message.substring(0, Math.min(message.length(), Short.MAX_VALUE));
|
||||
this.rejected = rejected;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue