mirror of https://github.com/apache/cassandra
Disallow negative buffer sizes
This commit is contained in:
parent
0a6bf2b7f5
commit
c919bcde52
|
|
@ -3067,7 +3067,7 @@ public class DatabaseDescriptor
|
|||
|
||||
public static void setCompressedReadAheadBufferSizeInKb(int sizeInKb)
|
||||
{
|
||||
if (sizeInKb != 0 && sizeInKb < 256)
|
||||
if (sizeInKb < 0 || (sizeInKb > 0 && sizeInKb < 256))
|
||||
throw new IllegalArgumentException("compressed_read_ahead_buffer_size_in_kb must be at least 256KiB (set to 0 to disable)");
|
||||
|
||||
conf.compressed_read_ahead_buffer_size = createIntKibibyteBoundAndEnsureItIsValidForByteConversion(sizeInKb, "compressed_read_ahead_buffer_size");
|
||||
|
|
|
|||
Loading…
Reference in New Issue