]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fix bug in WAL streaming uncompression (#11198)
authoranand76 <anand76@devvm4702.ftw0.facebook.com>
Wed, 8 Feb 2023 20:05:49 +0000 (12:05 -0800)
committeranand76 <anand76@devvm6332.prn0.facebook.com>
Fri, 10 Feb 2023 22:58:13 +0000 (14:58 -0800)
commit0ffa8db9b109d51cf22a90d6433c0a10c4bf1dfb
tree38fdbbcaf4ea74b1dc61f9a7b30702dd6969627e
parent1185bb75ca458764d504f0717b578104691fb9f7
Fix bug in WAL streaming uncompression (#11198)

Summary:
Fix a bug in the calculation of the input buffer address/offset in log_reader.cc. The bug is when consecutive fragments of a compressed record are located at the same offset in the log reader buffer, the second fragment input buffer is treated as a leftover from the previous input buffer. As a result, the offset in the `ZSTD_inBuffer` is not reset.

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

Test Plan: Add a unit test in log_test.cc that fails without the fix and passes with it.

Reviewed By: ajkr, cbi42

Differential Revision: D43102692

Pulled By: anand1976

fbshipit-source-id: aa2648f4802c33991b76a3233c5a58d4cc9e77fd
HISTORY.md
db/log_reader.cc
db/log_test.cc
util/compression.cc
util/compression.h