mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.1' into trunk
This commit is contained in:
commit
b2123dbb76
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue