remove unnecessary BB allocatetion; follow up for CASSANDRA-8979

This commit is contained in:
Oleg Anastasyev 2015-03-31 11:55:37 -05:00 committed by Yuki Morishita
parent ec958f05e4
commit 74bfa773a2
1 changed files with 10 additions and 10 deletions

View File

@ -157,20 +157,20 @@ public class PrecompactedRow extends AbstractCompactedRow
if (compactedCf == null)
return;
DataOutputBuffer buffer = new DataOutputBuffer();
try
// do not update digest in case of missing or purged row level tombstones, see CASSANDRA-8979
if (compactedCf.deletionInfo().getTopLevelDeletion() != DeletionTime.LIVE)
{
DeletionTime.serializer.serialize(compactedCf.deletionInfo().getTopLevelDeletion(), buffer);
// do not update digest in case of missing or purged row level tombstones, see CASSANDRA-8979
if (compactedCf.deletionInfo().getTopLevelDeletion() != DeletionTime.LIVE)
DataOutputBuffer buffer = new DataOutputBuffer();
try
{
DeletionTime.serializer.serialize(compactedCf.deletionInfo().getTopLevelDeletion(), buffer);
digest.update(buffer.getData(), 0, buffer.getLength());
}
}
catch (IOException e)
{
throw new RuntimeException(e);
catch (IOException e)
{
throw new RuntimeException(e);
}
}
compactedCf.updateDigest(digest);
}