rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

Expose pinned WriteBatchWithIndex::GetFromBatchAndDB through C bindings

Open tillrohrmann opened this issue 1 year ago • 2 comments

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.

tillrohrmann avatar Aug 24 '24 10:08 tillrohrmann

LGTM 👍

Thank you.

rhubner avatar Aug 29 '24 12:08 rhubner

@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.

alanpaxton avatar Oct 09 '24 09:10 alanpaxton

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?

tillrohrmann avatar Dec 16 '24 14:12 tillrohrmann

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.

tillrohrmann avatar May 03 '25 15:05 tillrohrmann

@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.

tillrohrmann avatar May 03 '25 15:05 tillrohrmann

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 12 '25 16:05 facebook-github-bot

@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.

jaykorean avatar May 12 '25 17:05 jaykorean

@tillrohrmann has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 13 '25 08:05 facebook-github-bot

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.

tillrohrmann avatar May 13 '25 08:05 tillrohrmann

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 13 '25 15:05 facebook-github-bot

@tillrohrmann has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar May 13 '25 18:05 facebook-github-bot

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar May 13 '25 18:05 facebook-github-bot

@jaykorean merged this pull request in facebook/rocksdb@2a0886b9a70c2842b057097aef5b9e2139a7edee.

facebook-github-bot avatar May 13 '25 21:05 facebook-github-bot