incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Schubert Zhang <zson...@gmail.com>
Subject MerkleTree.RowHash maybe a bug.
Date Thu, 11 Nov 2010 08:19:22 GMT
Hi JE,

0.6.6:
org.apache.cassandra.service.AntiEntropyService

I found the rowHash method uses "row.buffer.getData()" directly.
Since row.buffer.getData()  is a byte[], and there may have some junk bytes
in the end by the buffer, I think we should use the exact length.

        private MerkleTree.RowHash rowHash(CompactedRow row)
        {
            validated++;
            // MerkleTree uses XOR internally, so we want lots of output
bits here
            byte[] rowhash = FBUtilities.hash("SHA-256",
row.key.key.getBytes(), row.buffer.getData());
            return new MerkleTree.RowHash(row.key.token, rowhash);
        }


schubert.zhang@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message