Closed anand1976 closed 4 months ago
@anand1976 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@anand1976 has updated the pull request. You must reimport the pull request before landing.
@anand1976 has updated the pull request. You must reimport the pull request before landing.
@anand1976 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@anand1976 has updated the pull request. You must reimport the pull request before landing.
Quick question for my learning. I'm wondering where in the the test could have failed if we didn't make the change in the BlockFetcher. Or are we relying on ASAN to detect the issue while running the test?
I thought about adding some assertions, but its rather complicated since there are many different cases for sourcing the data buffer. I think ASAN is the best way to catch it for now.
@anand1976 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@anand1976 merged this pull request in facebook/rocksdb@0ae3d9f98deac3259d16eb64009df659d3c8259b.
A
BlockBasedTable
withTieredSecondaryCache
containing a NVM cache inserts blocks into the compressed cache and the corresponding compressed block into the NVM cache. TheBlockFetcher
is used to get the uncompressed and compressed blocks by callingReadBlockContents()
andGetUncompressedBlock()
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.Test plan: