Merge branch 'cassandra-2.1' into trunk

This commit is contained in:
Benedict Elliott Smith 2015-02-12 14:04:28 +00:00
commit b2123dbb76
2 changed files with 3 additions and 0 deletions

View File

@ -150,6 +150,8 @@ public class CompressedSequentialWriter extends SequentialWriter
{
if (overrideLength <= 0)
return metadataWriter.open(originalSize, chunkOffset, isFinal ? FINAL : SHARED_FINAL);
// we are early opening the file, make sure we open metadata with the correct size
assert !isFinal;
return metadataWriter.open(overrideLength, chunkOffset, SHARED);
}

View File

@ -352,6 +352,7 @@ public class CompressionMetadata
this.offsets.unreference();
}
// null out our reference to the original shared data to catch accidental reuse
// note that since noone is writing to this Writer while we open it, null:ing out this.offsets is safe
this.offsets = null;
if (type == OpenType.SHARED_FINAL)
{