incubator-cassandra-dev mailing list archives

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


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

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