Skip to content

Commit

Permalink
Clarification regarding record format
Browse files Browse the repository at this point in the history
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 facebook#3576

Differential Revision: D7196478

Pulled By: siying

fbshipit-source-id: 39f7a0395075cc73e2aa2bfc9e42c85bce35e765
  • Loading branch information
glaslos authored and facebook-github-bot committed Mar 8, 2018
1 parent b560fc9 commit a277b0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/log_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit a277b0f

Please sign in to comment.