Expose pinned WriteBatchWithIndex::GetFromBatchAndDB through C bindings
Expose pinned WriteBatchWithIndex::GetFromBatchAndDB through C bindings so that one can read data from the WriteBatchWithIndex and db w/o copying the data.
This fixes #12969.
LGTM 👍
Thank you.
@tillrohrmann I think you need to rebase your PR - once that is done you will need to persuade someone from the RocksDB Core Team at meta to merge it.
I've rebased this PR onto the latest main. @rhubner is there anything else that I need to do before this PR can be merged?
I've rebased this PR onto the latest main. I think this extension of the C API could be useful for others as well. Right now our project relies on it and w/o merging it upstream we are forced to maintain a fork of RocksDB which I would like to avoid in the future. @rhubner let me know whether there is anything missing for merging this PR.
@cbi42, @jaykorean could you maybe help with moving this PR forward? I've seen that you've been actively reviewing C API related PRs recently.
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@tillrohrmann ASAN detected some leaks in your tests. I have not looked deeper, but I just glimpsed the error and it looks like the new rocksdb_pinnableslice_t that you got needs to be cleaned up after the verification.
I will re-import the PR after it's fixed. Just let me know when it's ready.
@tillrohrmann has updated the pull request. You must reimport the pull request before landing.
Thanks a lot for pointing the problem out to me @jaykorean. I think you are right that this was the cause for the leak. I've pushed an update.
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@tillrohrmann has updated the pull request. You must reimport the pull request before landing.
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@jaykorean merged this pull request in facebook/rocksdb@2a0886b9a70c2842b057097aef5b9e2139a7edee.