Fix stale memory access with FSBuffer and tiered sec cache by anand1976 · Pull Request #12712 · facebook/rocksdb (original) (raw)
anand1976 changed the title
Fix stale memory access with tiered sec cache and FSBuffer Fix stale memory access with FSBuffer and tiered sec cache
anand1976 added a commit that referenced this pull request
Summary:
A BlockBasedTable with TieredSecondaryCache containing a NVM cache inserts blocks into the compressed cache and the corresponding compressed block into the NVM cache. The BlockFetcher is used to get the uncompressed and compressed blocks by calling ReadBlockContents() and GetUncompressedBlock() respectively. If the file system supports FSBuffer (i.e returning a FS allocated buffer rather than caller provided), that buffer gets freed between the two calls. This PR fixes it by making the FSBuffer unique pointer a member rather than local variable.
Pull Request resolved: #12712
Test Plan:
- Add a unit test
- Release validation stress test
Reviewed By: jaykorean
Differential Revision: D57974026
Pulled By: anand1976
fbshipit-source-id: cfa895914e74b4f628413b40e6e39d8d8e5286bd
ajkr pushed a commit that referenced this pull request
Summary:
A BlockBasedTable with TieredSecondaryCache containing a NVM cache inserts blocks into the compressed cache and the corresponding compressed block into the NVM cache. The BlockFetcher is used to get the uncompressed and compressed blocks by calling ReadBlockContents() and GetUncompressedBlock() respectively. If the file system supports FSBuffer (i.e returning a FS allocated buffer rather than caller provided), that buffer gets freed between the two calls. This PR fixes it by making the FSBuffer unique pointer a member rather than local variable.
Pull Request resolved: #12712
Test Plan:
- Add a unit test
- Release validation stress test
Reviewed By: jaykorean
Differential Revision: D57974026
Pulled By: anand1976
fbshipit-source-id: cfa895914e74b4f628413b40e6e39d8d8e5286bd
ybtsdst pushed a commit to ybtsdst/rocksdb that referenced this pull request
Summary:
A BlockBasedTable with TieredSecondaryCache containing a NVM cache inserts blocks into the compressed cache and the corresponding compressed block into the NVM cache. The BlockFetcher is used to get the uncompressed and compressed blocks by calling ReadBlockContents() and GetUncompressedBlock() respectively. If the file system supports FSBuffer (i.e returning a FS allocated buffer rather than caller provided), that buffer gets freed between the two calls. This PR fixes it by making the FSBuffer unique pointer a member rather than local variable.
Pull Request resolved: facebook#12712
Test Plan:
- Add a unit test
- Release validation stress test
Reviewed By: jaykorean
Differential Revision: D57974026
Pulled By: anand1976
fbshipit-source-id: cfa895914e74b4f628413b40e6e39d8d8e5286bd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})