[ 
https://issues.apache.org/jira/browse/CASSANDRA-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865775#action_12865775
 ] 

Jonathan Ellis commented on CASSANDRA-1056:
-------------------------------------------

Anty writes on dev list: "I have reviewed the patch,and have done test on my 
litter luster, all is good."

> size of row in spanned index entries does not include key bytes
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-1056
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1056
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Trivial
>             Fix For: 0.6.2
>
>         Attachments: 1056.txt
>
>
> from Anty on the mailing list,
> In source code of 0.6.1 ,in SSTableWriter,
> private void afterAppend(DecoratedKey decoratedKey, long dataPosition, int 
> dataSize) throws IOException
>     {
>         String diskKey = partitioner.convertToDiskFormat(decoratedKey);
>         bf.add(diskKey);
>         lastWrittenKey = decoratedKey;
>         long indexPosition = indexFile.getFilePointer();
>         indexFile.writeUTF(diskKey);
>         indexFile.writeLong(dataPosition);
>         if (logger.isTraceEnabled())
>             logger.trace("wrote " + decoratedKey + " at " + dataPosition);
>         if (logger.isTraceEnabled())
>             logger.trace("wrote index of " + decoratedKey + " at " + 
> indexPosition);
>         indexSummary.maybeAddEntry(decoratedKey, dataPosition, dataSize, 
> indexPosition, indexFile.getFilePointer());
>     }
> the value of "dataSize" is the length of value( column family) ,not including 
> the length of key.
> but in  the method  loadIndexFile() of SStableReader
> ...
>     else
>                 {
>                     input.readUTF();
>                     nextDataPosition = input.readLong();
>                     input.seek(nextIndexPosition);
>                 }
>                 indexSummary.maybeAddEntry(decoratedKey, dataPosition, 
> nextDataPosition - dataPosition, indexPosition, nextIndexPosition);
>             }
>             indexSummary.complete();
> the value of nextDataPosition - dataPosition is the length of key and value 
> ,not just the length of value .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to