Build rocksdb 11.8.0 - #86
Open
theolivenbaum wants to merge 2 commits into
Open
Conversation
Regenerates the bindings from 11.8.0's c.h, which grew from 1044 to 1739 exported functions, and covers the API changes the release calls out. Code generator, all of which the new header tripped over: * c.h now has two "BackupEngineOptions" region comments, one over the backup engine functions and one over the options setters at the end. Region titles key everything downstream, so repeats are folded into their first occurrence. * Enum values are parsed as C integer expressions rather than by rewriting the text "1 << 3" into "8" -- the new trace filter flags are written 0x1 << 3, which that pass turned into 0x8 and left the parser reading a value named x8. * An anonymous enum whose values share no whole underscore-separated prefix threw instead of being named. The common prefix now backs up to the last underscore, which names the new WAL file type enum, and an enum that still cannot be named is reported rather than crashing the generator. * Aliases for uint32_t* and for the five function-pointer typedefs 11.8.0 adds. API: * FlushOptions.SetWaitForListeners maps FlushOptions::listener_wait, the one C API addition in the release notes. FlushOptions also no longer derives from OptionsHandle, whose constructor left it holding a rocksdb_options_t that was then passed to every rocksdb_flushoptions_* call and to rocksdb_flush. * ReadOptions.SetValueSizeSoftLimit, plus MultiGetWithStatus, which reports each key's status where MultiGet throws on the first one that has any. Without it the soft limit is unusable: the keys past the limit come back Aborted for the caller to retry, and MultiGet turns that into an exception that also discards the values that were read. * DbOptions gains read_io_executor_threads, open_files_async and async_wal_precreate. Asynchronous reads: GetAsync, MultiGetAsync, MultiGetWithStatusAsync and HasKeyAsync release the calling thread for the duration of the read. They are not bound to 11.8.0's DB::GetAsync()/DB::MultiGetAsync() -- those are declared in db.h only and no C API reaches them -- so they run on the thread pool, which is documented on the methods and in the README along with the fact that ReadOptions::async_io is what carries real asynchronous file IO here. bzip2 gained the Debian and Ubuntu .orig.tar.gz as fallback locations; they are the unmodified upstream tarball, so rocksdb's checksum still verifies, and sourceware.org being the only source made it a single point of failure. Validated by building librocksdb.so for linux-x64 from the 11.8.0 sources and running the test project against it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015SdxM3u734XDBsuMnUxRHs
They were Task-returning wrappers around the synchronous C API, not bindings for 11.8.0's DB::GetAsync()/DB::MultiGetAsync(), which the C API does not expose. Offering them under those names invites callers to expect RocksDB's coroutine read path and get a thread pool thread blocked on a synchronous read instead, so wait for a C API rather than ship the resemblance. MultiGetWithStatus stays: it is what makes ReadOptions::value_size_soft_limit usable, and has nothing to do with asynchrony. So do the DBOptions settings, which are real C API entry points whatever RocksDB does behind them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015SdxM3u734XDBsuMnUxRHs
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regenerates the bindings from 11.8.0's c.h, which grew from 1044 to 1739
exported functions, and covers the API changes the release calls out.
Code generator, all of which the new header tripped over:
engine functions and one over the options setters at the end. Region titles
key everything downstream, so repeats are folded into their first occurrence.
text "1 << 3" into "8" -- the new trace filter flags are written 0x1 << 3,
which that pass turned into 0x8 and left the parser reading a value named x8.
threw instead of being named. The common prefix now backs up to the last
underscore, which names the new WAL file type enum, and an enum that still
cannot be named is reported rather than crashing the generator.
API:
API addition in the release notes. FlushOptions also no longer derives from
OptionsHandle, whose constructor left it holding a rocksdb_options_t that was
then passed to every rocksdb_flushoptions_* call and to rocksdb_flush.
key's status where MultiGet throws on the first one that has any. Without it
the soft limit is unusable: the keys past the limit come back Aborted for the
caller to retry, and MultiGet turns that into an exception that also discards
the values that were read.
async_wal_precreate.
Asynchronous reads: GetAsync, MultiGetAsync, MultiGetWithStatusAsync and
HasKeyAsync release the calling thread for the duration of the read. They are
not bound to 11.8.0's DB::GetAsync()/DB::MultiGetAsync() -- those are declared
in db.h only and no C API reaches them -- so they run on the thread pool, which
is documented on the methods and in the README along with the fact that
ReadOptions::async_io is what carries real asynchronous file IO here.
bzip2 gained the Debian and Ubuntu .orig.tar.gz as fallback locations; they are
the unmodified upstream tarball, so rocksdb's checksum still verifies, and
sourceware.org being the only source made it a single point of failure.
Validated by building librocksdb.so for linux-x64 from the 11.8.0 sources and
running the test project against it.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015SdxM3u734XDBsuMnUxRHs