Skip to content

Commit

Permalink
fix: StringValueCodec (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
caojiajun committed Jan 9, 2025
1 parent bec15ee commit ac90adf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static StringValueEncodeResult encode(short slot, BlockType blockType, IV
public static StringValueDecodeResult decode(byte[] data, BlockType blockType) {
ByteBuffer buffer = ByteBuffer.wrap(data);
int crc1 = buffer.getInt();
int crc2 = RedisClusterCRC16Utils.getCRC16(data, 6, data.length);
int crc2 = RedisClusterCRC16Utils.getCRC16(data, 10, data.length);
if (crc1 != crc2) {
return new StringValueDecodeResult(new ArrayList<>(), -1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ public class EmbeddedStorageConstants {
public static final int _1024k = 1024*1024;
public static final int key_manifest_bit_size = (int)(16*1024*1024*1024L / _64k);//16Gib
public static final long data_file_size = 192*1024*1024*1024L;//128Gib
public static final int block_header_len = 4+2+1+4+4;
public static final int block_header_len = 4+4+2+1+4+4;
}

0 comments on commit ac90adf

Please sign in to comment.