1
0
mirror of https://github.com/facebook/rocksdb.git synced 2025-06-02 18:41:22 +08:00
Changyu Bi 9882652b0e Verify write batch checksum before WAL ()
Summary:
Context: WriteBatch can have key-value checksums when it was created `with protection_bytes_per_key > 0`.
This PR added checksum verification for write batches before they are written to WAL.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10114

Test Plan:
- Added new unit tests to db_kv_checksum_test.cc: `make check -j32`
- benchmark on performance regression: `./db_bench --benchmarks=fillrandom[-X20] -db=/dev/shm/test_rocksdb -write_batch_protection_bytes_per_key=8`
  - Pre-PR:
`
fillrandom [AVG    20 runs] : 198875 (± 3006) ops/sec;   22.0 (± 0.3) MB/sec
`
  - Post-PR:
`
fillrandom [AVG    20 runs] : 196487 (± 2279) ops/sec;   21.7 (± 0.3) MB/sec
`
  Mean regressed about 1% (198875 -> 196487 ops/sec).

Reviewed By: ajkr

Differential Revision: D36917464

Pulled By: cbi42

fbshipit-source-id: 29beb74edf65f04b1a890b4f650d873dc7ed790d
2022-06-15 13:43:58 -07:00
..
2022-06-02 23:42:41 -07:00
2022-05-06 13:03:58 -07:00
2022-04-11 10:26:55 -07:00
2022-04-11 10:26:55 -07:00
2022-05-06 13:03:58 -07:00
2022-05-06 13:03:58 -07:00
2022-05-06 13:03:58 -07:00
2022-05-05 13:08:21 -07:00