mirror of https://github.com/apache/cassandra
back out of last commit
git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@957304 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
18fe1ebeb3
commit
31c40fbe18
|
|
@ -380,7 +380,7 @@ public class SSTableReader extends SSTable implements Comparable<SSTableReader>
|
|||
public long getPosition(DecoratedKey decoratedKey, Operator op)
|
||||
{
|
||||
// first, check bloom filter
|
||||
if (op == Operator.EQ && !bf.isPresent(decoratedKey.key))
|
||||
if (op == Operator.EQ && !bf.isPresent(partitioner.convertToDiskFormat(decoratedKey)))
|
||||
return -1;
|
||||
|
||||
// next, the key cache
|
||||
|
|
|
|||
|
|
@ -294,9 +294,10 @@ public class SSTableWriter extends SSTable
|
|||
|
||||
public void afterAppend(DecoratedKey key, long dataPosition) throws IOException
|
||||
{
|
||||
bf.add(key.key);
|
||||
byte[] diskKey = partitioner.convertToDiskFormat(key);
|
||||
bf.add(diskKey);
|
||||
long indexPosition = indexFile.getFilePointer();
|
||||
FBUtilities.writeShortByteArray(key.key, indexFile);
|
||||
FBUtilities.writeShortByteArray(diskKey, indexFile);
|
||||
indexFile.writeLong(dataPosition);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("wrote index of " + key + " at " + indexPosition);
|
||||
|
|
|
|||
Loading…
Reference in New Issue