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
main
Lukas Rist 7 years ago committed by Facebook Github Bot
parent b560fc9f62
commit a277b0f2b7
  1. 2
      db/log_writer.h

@ -49,7 +49,7 @@ namespace log {
* |CRC (4B) | Size (2B) | Type (1B) | Payload | * |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 * Size = Length of the payload data
* Type = Type of record * Type = Type of record
* (kZeroType, kFullType, kFirstType, kLastType, kMiddleType ) * (kZeroType, kFullType, kFirstType, kLastType, kMiddleType )

Loading…
Cancel
Save