From a277b0f2b7694f7bc7ac8d1e7201f9719f5898ba Mon Sep 17 00:00:00 2001 From: Lukas Rist Date: Thu, 8 Mar 2018 10:11:18 -0800 Subject: [PATCH] Clarification regarding record format Summary: The CRC is actually calculated based on the record type and payload. The wiki should also be updated accordingly and extended with a section on the recyclable record format. Closes https://github.com/facebook/rocksdb/pull/3576 Differential Revision: D7196478 Pulled By: siying fbshipit-source-id: 39f7a0395075cc73e2aa2bfc9e42c85bce35e765 --- db/log_writer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/log_writer.h b/db/log_writer.h index a3a879924..143ad2674 100644 --- a/db/log_writer.h +++ b/db/log_writer.h @@ -49,7 +49,7 @@ namespace log { * |CRC (4B) | Size (2B) | Type (1B) | Payload | * +---------+-----------+-----------+--- ... ---+ * - * CRC = 32bit hash computed over the payload using CRC + * CRC = 32bit hash computed over the record type and payload using CRC * Size = Length of the payload data * Type = Type of record * (kZeroType, kFullType, kFirstType, kLastType, kMiddleType )