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:
Gary Dusbabek 2010-06-23 19:00:09 +00:00
parent 18fe1ebeb3
commit 31c40fbe18
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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);