Merge branch 'cassandra-2.1' into trunk

This commit is contained in:
Joshua McKenzie 2015-01-07 12:36:21 -06:00
commit ac27409e1b
2 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,7 @@
2.1.3
* Better detection/logging for corruption in compressed sstables (CASSANDRA-8192)
* Use the correct repairedAt value when closing writer (CASSANDRA-8570)
* (cqlsh) Handle a schema mismatch being detected on startup (CASSANDRA-8512)
* Properly calculate expected write size during compaction (CASSANDRA-8532)

View File

@ -180,6 +180,9 @@ public class CompressionMetadata
try
{
int chunkCount = input.readInt();
if (chunkCount <= 0)
throw new IOException("Compressed file with 0 chunks encountered: " + input);
Memory offsets = Memory.allocate(chunkCount * 8);
for (int i = 0; i < chunkCount; i++)
@ -404,6 +407,8 @@ public class CompressionMetadata
public Chunk(long offset, int length)
{
assert(length > 0);
this.offset = offset;
this.length = length;
}