{"owner":"facebook","repo":"rocksdb","hasSkills":true,"totalSkillsCount":10,"totalTokensCount":30962,"categories":["anthropic-skill","root-instruction","plugin-manifest","claude-rule"],"hasMcp":false,"mcpConfig":null,"found":["tools/c_api_gen/abi_type_overrides.json","tools/c_api_gen/equivalence_allowlist.json","tools/c_api_gen/api_compatibility_allowlist.json","AGENTS.md","tools/advisor/README.md","CLAUDE.md","tools/cpu_corruption_injector/README.md","tools/c_api_gen/README.md","tools/c_api_gen/spec.json","tools/c_api_gen/auto_simple_bindings_blocklist.json"],"skills":{"tools/c_api_gen/abi_type_overrides.json":"{\n  \"schema_version\": 1,\n  \"description\": [\n    \"ABI-preserving C type overrides for auto-generated C API wrappers.\",\n    \"\",\n    \"RocksDB's C API has a strong backward-compatibility guarantee: the C\",\n    \"signature of a function that has already shipped must never change, even\",\n    \"when the underlying C++ field type would naturally map to a different C\",\n    \"type. The auto-generator derives the C type from the C++ field (e.g. bool\",\n    \"-> unsigned char, uint64_t -> uint64_t, an enum -> int). For a handful of\",\n    \"pre-existing functions the historical hand-written C type differs from\",\n    \"that natural mapping, so we pin it here. The generated body still casts to\",\n    \"the real C++ field type via static_cast<decltype(field)>(value), so the\",\n    \"behavior is identical -- only the public C parameter/return type is held\",\n    \"stable.\",\n    \"\",\n    \"Only add entries for functions that already shipped with a different type.\",\n    \"Brand-new functions should use the natural mapping. The equivalence\",\n    \"validator (validate_generated_equivalence.py) enforces that generated\",\n    \"signatures match the reference revision, so any unintended drift here will\",\n    \"fail CI.\"\n  ],\n  \"overrides\": [\n    {\n      \"function\": \"rocksdb_writeoptions_disable_WAL\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int disable` long before codegen; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_restore_options_set_keep_log_files\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int v`; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_checksum\",\n      \"role\": \"setter\",\n      \"c_type\": \"char\",\n      \"field_cxx_type\": \"ChecksumType\",\n      \"reason\": \"Shipped as `char`; the field is the ChecksumType enum but the C parameter type must stay `char` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_format_version\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"uint32_t\",\n      \"reason\": \"Shipped as `int`; the field is uint32_t but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_block_size\",\n      \"role\": \"setter\",\n      \"c_type\": \"size_t\",\n      \"field_cxx_type\": \"uint64_t\",\n      \"reason\": \"Shipped as `size_t block_size`; the field is uint64_t but the C parameter type must stay `size_t` for ABI compatibility.\"\n    }\n  ]\n}\n","tools/c_api_gen/equivalence_allowlist.json":"{\n  \"allowlist\": [\n    {\n      \"name\": \"rocksdb_transactiondb_options_set_use_per_key_point_lock_mgr\",\n      \"reason\": \"The old handwritten implementation existed in db/c.cc but was not declared in include/rocksdb/c.h. The generated declaration intentionally fixes that historical inconsistency.\"\n    }\n  ]\n}\n","tools/c_api_gen/api_compatibility_allowlist.json":"{\n  \"schema_version\": 1,\n  \"description\": [\n    \"Documented, intentional backward-incompatible changes to the public C API\",\n    \"(include/rocksdb/c.h), checked by check_api_compatibility.py.\",\n    \"\",\n    \"Each entry suppresses one otherwise-failing finding. 'kind' is 'removed'\",\n    \"(a function that existed in the baseline is gone) or 'changed' (its\",\n    \"signature changed). Only add entries for changes that are deliberate and\",\n    \"reviewed; every entry needs a reason.\"\n  ],\n  \"allow\": [\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_writebatch_wi_create_from\",\n      \"reason\": \"Declared in c.h but never implemented anywhere in RocksDB (WriteBatchWithIndex has no constructor from a serialized representation). The symbol never existed, so no consumer could have linked against it; the dead declaration was removed.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_user_key_common_prefix\",\n      \"reason\": \"Getter for the format_version 8 'user_key_common_prefix' table property, which a predecessor (D116105558) reserved for a whole-file common-prefix optimization that was investigated and rejected. The property and this generated getter are removed before format_version 8 (and thus the property) appears in any release, so no released consumer could depend on it.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_set_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_get_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_external_sst_file_global_seqno_offset\",\n      \"reason\": \"Removed after write_global_seqno was removed because RocksDB no longer mutates the global sequence number stored in external SST files during ingestion.\"\n    }\n  ]\n}\n","AGENTS.md":"# Agent Instructions\n\nThis repository's authoritative agent instructions live in `CLAUDE.md`.\n\nRead and follow [`CLAUDE.md`](./CLAUDE.md) in full before making changes or\nreviewing code in this checkout.\n\nIf there is any ambiguity between this file and `CLAUDE.md`, `CLAUDE.md` takes\nprecedence.\n","tools/advisor/README.md":"# Rocksdb Tuning Advisor\n\n## Motivation\n\nThe performance of Rocksdb is contingent on its tuning. However,\nbecause of the complexity of its underlying technology and a large number of\nconfigurable parameters, a good configuration is sometimes hard to obtain. The aim of\nthe python command-line tool, Rocksdb Advisor, is to automate the process of\nsuggesting improvements in the configuration based on advice from Rocksdb\nexperts.\n\n## Overview\n\nExperts share their wisdom as rules comprising of conditions and suggestions in the INI format (refer\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\nUsers provide the Rocksdb configuration that they want to improve upon (as the\nfamiliar Rocksdb OPTIONS file —\n[example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini))\nand the path of the file which contains Rocksdb logs and statistics.\nThe [Advisor](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser_example.py)\ncreates appropriate DataSource objects (for Rocksdb\n[logs](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_log_parser.py),\n[options](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_options_parser.py),\n[statistics](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_stats_fetcher.py) etc.)\nand provides them to the [Rules Engine](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser.py).\nThe Rules uses rules from experts to parse data-sources and trigger appropriate rules.\nThe Advisor's output gives information about which rules were triggered,\nwhy they were triggered and what each of them suggests. Each suggestion\nprovided by a triggered rule advises some action on a Rocksdb\nconfiguration option, for example, increase CFOptions.write_buffer_size,\nset bloom_bits to 2 etc.\n\n## Usage\n\n### Prerequisites\nThe tool needs the following to run:\n* python3\n\n### Running the tool\nAn example command to run the tool:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --rules_spec=advisor/rules.ini --rocksdb_options=test/input_files/OPTIONS-000005 --log_files_path_prefix=test/input_files/LOG-0 --stats_dump_period_sec=20\n```\n\n### Command-line arguments\n\nMost important amongst all the input that the Advisor needs, are the rules\nspec and starting Rocksdb configuration. The configuration is provided as the\nfamiliar Rocksdb Options file (refer [example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini)).\nThe Rules spec is written in the INI format (more details in\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\n\nIn brief, a Rule is made of conditions and is triggered when all its\nconstituent conditions are triggered. When triggered, a Rule suggests changes\n(increase/decrease/set to a suggested value) to certain Rocksdb options that\naim to improve Rocksdb performance. Every Condition has a 'source' i.e.\nthe data source that would be checked for triggering that condition.\nFor example, a log Condition (with 'source=LOG') is triggered if a particular\n'regex' is found in the Rocksdb LOG files. As of now the Rules Engine\nsupports 3 types of Conditions (and consequently data-sources):\nLOG, OPTIONS, TIME_SERIES. The TIME_SERIES data can be sourced from the\nRocksdb [statistics](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/statistics.h)\nor [perf context](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/perf_context.h).\n\nFor more information about the remaining command-line arguments, run:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --help\n```\n\n### Sample output\n\nHere, a Rocksdb log-based rule has been triggered:\n\n```shell\nRule: stall-too-many-memtables\nLogCondition: stall-too-many-memtables regex: Stopping writes because we have \\d+ immutable memtables \\(waiting for flush\\), max_write_buffer_number is set to \\d+\nSuggestion: inc-bg-flush option : DBOptions.max_background_flushes action : increase suggested_values : ['2']\nSuggestion: inc-write-buffer option : CFOptions.max_write_buffer_number action : increase\nscope: col_fam:\n{'default'}\n```\n\n## Running the tests\n\nTests for the code have been added to the\n[test/](https://github.com/facebook/rocksdb/tree/main/tools/advisor/test)\ndirectory. For example, to run the unit tests for db_log_parser.py:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m unittest -v test.test_db_log_parser\n```\n","CLAUDE.md":"# RocksDB Code Generation and Review Guidance\n\nThis document provides guidance for generating and reviewing code in the RocksDB project, derived from analysis of code review feedback across hundreds of complex merged Pull Requests. Use this as a reference when writing code with AI assistants or conducting code reviews.\n\n---\n\n## General Best Practices\n\n### Code Quality and Maintainability\n\n**Clarity and Readability:** Write clear, self-documenting code. Use meaningful variable names, add comments for complex logic, and structure code to minimize cognitive load. Avoid clever tricks that sacrifice readability for marginal performance gains unless absolutely necessary.\n\n**Consistent Style:** Follow existing code style conventions. RocksDB uses `.clang-format` for formatting, specific naming conventions, and structural patterns. Deviations from these patterns are frequently flagged in reviews.\n\n**Error Handling:** Ensure robust error handling throughout the codebase. Use RocksDB's `Status` type consistently, propagate errors appropriately, and avoid silently ignoring failures. Reviewers pay close attention to edge cases and failure modes.\n\n**Refactoring traps:** At least in production code, avoid constructs that could allow existing code to unexpectedly, quietly change meaning.\nSpecifically:\n* Avoid new defaulted parameters. This is the #1 trap on refactoring!\n* Avoid static_cast, reinterpret_cast, and C-style casts; static_cast_with_check, up_cast, and lossless_cast from cast_util.h are preferred.\n* Avoid declared type `auto` (`auto&`, `auto*` OK).\n\n### Testing Philosophy\n\n**Comprehensive Coverage:** Every change should include appropriate test coverage. This includes unit tests for isolated functionality, integration tests for component interactions, and stress tests for concurrency and performance validation. Reviewers will ask for additional tests if coverage is insufficient.\n\n**Edge Cases and Failure Modes:** Tests should explicitly cover edge cases, boundary conditions, and potential failure scenarios. This is especially important for changes affecting core database operations, compaction, or recovery logic.\n\n**Platform-Specific Testing:** RocksDB supports multiple platforms (Linux, Windows, macOS) and compilers (GCC, Clang, MSVC). Changes should be tested across relevant platforms, particularly when touching platform-specific code or using compiler-specific features.\n\n### Performance Considerations\n\n**⚠️ PERFORMANCE IS CRITICAL:** RocksDB is a high-performance storage engine where every CPU cycle and memory access matters. When writing code, always evaluate from a performance perspective. This is not optional—performance-aware coding is a fundamental requirement for all contributions.\n\n**Benchmarking and Profiling:** Performance claims should be backed by empirical evidence. Use RocksDB's benchmarking tools (e.g., `db_bench`) to validate improvements. Reviewers will request benchmark results for changes that could impact performance.\n\n**Memory Allocation:** Minimize dynamic memory allocations, especially in hot paths. Prefer stack allocation over heap allocation. Reuse buffers when possible. Consider using arena allocators or memory pools for frequent small allocations. Every `new`, `malloc`, or container resize has a cost.\n\n**Memory Copy:** Avoid unnecessary memory copies. Use move semantics, `std::string_view`, `Slice`, and pass-by-reference where appropriate. Be aware of implicit copies in STL containers and function returns. Prefer in-place operations over copy-and-modify patterns.\n\n**CPU Cache Efficiency:** Design data structures and access patterns to be cache-friendly. Keep frequently accessed data together (data locality). Prefer sequential memory access over random access. Be mindful of cache line sizes (CACHE_LINE_SIZE, typically 64 bytes) and avoid false sharing in concurrent code (see CacheAlignedWrapper). Especially when adding new data members, be mindful of ordering within structs and classes to reduce unnecessary padding (special care with bool members) and avoid larger-than-necessary types (e.g. prefer OptSlice to std::optional<Slice>).\n\n**Loop Optimization:** Look for opportunities to collapse nested loops, reduce loop overhead, and minimize branch mispredictions. Hoist invariant computations out of loops. Consider loop unrolling for tight inner loops. Batch operations when possible to amortize per-operation overhead.\n\n**SIMD and Vectorization:** Leverage SIMD instructions (SSE, AVX) for data-parallel operations when appropriate. Structure data to enable auto-vectorization by the compiler. Consider explicit SIMD intrinsics for critical hot paths like checksum computation, encoding/decoding, and bulk data processing.\n\n**Branch Prediction:** Minimize unpredictable branches in hot paths. Use `LIKELY`/`UNLIKELY` macros to hint branch prediction, e.g. for error cases and other rare or otherwise costly cases, but NOT for predicting popular configurations. Consider branchless alternatives for simple conditionals. Order switch cases and if-else chains by frequency.\n\n**Memory and Resource Management:** Be mindful of memory allocations, especially in hot paths. Use RAII patterns, smart pointers, and RocksDB's memory management utilities appropriately.\n\n**Hot Path Analysis:** When deciding how aggressively to optimize code, consider whether it's on a hot path:\n- **Hot path** (executed thousands+ times, e.g., data access, iteration, compaction loops): Performance is paramount. Apply all optimization techniques—loop collapsing, SIMD, cache optimization, pre-allocation, etc. The cost of each operation is multiplied by execution frequency.\n- **Cold path** (executed rarely, e.g., DB open, configuration parsing, error handling): Maintainability and clarity are more important. Prefer readable code over micro-optimizations. Complex optimizations here add maintenance burden with negligible performance benefit.\n- **Warm path** (moderate frequency): Balance both concerns. Use profiling data to guide optimization decisions.\n\n**Avoid Premature Optimization:** Performance is known critical in places like inner loops of compaction, read path and write path. Elsewhere, try to find a \"holy trinity\" solution of *correct, simple, and reasonably efficient*. More complex solutions are only appropriate when profiling/benchmarking data shows a measurable payoff.\n\n### API Design and Compatibility\n\n**Backwards Compatibility:** RocksDB maintains strong backwards compatibility guarantees. Breaking changes are rare and require extensive justification. When deprecating features, follow the project's deprecation policy (typically spanning multiple releases).\n\n**Behavioral Compatibility:** Behavior changes are human judgment calls that must be intentional, well-documented (including release notes), and well researched for potential downstream production impact. Agents and reviewers must call out potential gaps, ambiguity, or adverse impacts in intentionality, documentation, and production impact. For an existing accepted input—including an undocumented, discouraged, or historically ignored value—the analysis should compare old and new observable behavior, including performance and resource impact, identify known direct callers and stored configurations, and add or update regression coverage as appropriate.\n\n**API Consistency:** New APIs should be consistent with existing patterns. Use similar naming conventions, parameter ordering, and return types. Reviewers will suggest changes to improve consistency with the broader codebase.\n\n**Documentation:** Public APIs must be thoroughly documented, without unnecessary embelishment nor dwelling on implementation details nor project planning. When non-obvious, include usage examples, parameter descriptions, known bugs or limitations, notes on thread safety, performance characteristics, and compatibility considerations. Re-read comments for ambiguous terminology and phrasing, such as ambiguously re-purposed programming jargon.\n\n---\n\n## Component-Specific Guidance\n\n### Database Core (`db`)\n\nThe database core handles write-ahead logging (WAL), memtables, compaction, and recovery. This component receives the most scrutiny in code reviews.\n\n**Concurrency and Thread Safety:** Database operations are highly concurrent. Reviewers carefully examine locking strategies, atomic operations, and memory ordering. Document synchronization assumptions clearly. Use appropriate memory ordering semantics (`acquire`/`release` vs. `seq_cst`).\n\n**Compaction Logic:** Changes to compaction are complex and high-risk. Ensure that compaction logic respects configured parameters, handles edge cases (empty databases, single-file compactions), and maintains correctness under concurrent operations.\n\n**Error Propagation:** Database operations can fail in many ways (I/O errors, corruption, resource exhaustion). Ensure that errors are properly propagated, logged, and handled. Avoid assertions in production code paths.\n\n**Testing:** Database core changes require extensive testing, including unit tests, integration tests, and stress tests. Test with various configurations, compaction styles, and concurrent workloads.\n\n### Public Headers / \"Public API\" (`include/rocksdb/`)\n\nPublic headers define RocksDB's API surface. Changes here have the highest compatibility impact.\n\n**API Design:** New APIs should be intuitive, consistent with existing patterns, and well-documented. Consider how the API will be used in practice and avoid adding unnecessary complexity.\n\n**Backwards Compatibility:** Breaking changes to public APIs require extensive justification and a deprecation plan. Maintain ABI compatibility for bug fixes and patch releases.\n\n**Documentation:** Every public API must be thoroughly documented with usage examples, parameter descriptions, and notes on thread safety and performance characteristics.\n\n**Deprecation:** When deprecating APIs, follow the project's policy. Mark deprecated APIs clearly, provide migration guidance, and maintain support for at least one major release.\n\n### Internal Utilities (`util`)\n\nInternal utilities provide common functionality used throughout the codebase.\n\n**Code Reuse:** Utilities should be general-purpose and reusable. Avoid duplicating functionality that already exists elsewhere in the codebase.\n\n**Error Handling:** Utility functions should handle errors robustly and propagate them appropriately. Consider edge cases like overflow, underflow, and invalid inputs.\n\n**Testing:** Utility functions should have comprehensive test coverage, including edge cases and failure modes. Consider adding death tests for assertions.\n\n**Performance:** Utilities are often used in hot paths. Ensure that implementations are efficient and avoid unnecessary allocations or copies.\n\n### Table Management (`table`)\n\nTable management handles SST file format, block-based tables, and table readers/writers.\n\n**Block Format and Checksums:** Changes to block format require extreme care. Ensure that checksums are computed and verified correctly. Test with various compression algorithms and block sizes.\n\n**Iterator Correctness:** Table iterators are used throughout the codebase. Ensure that iterator semantics (Seek, Next, Prev) are correct, especially at boundaries and with deletions.\n\n**Caching and Prefetching:** Table readers interact with the block cache and prefetching logic. Ensure that cache keys are unique and that prefetching respects configured limits.\n\n**Performance:** Table operations are performance-critical. Benchmark changes that could impact read or write performance.\n\n### Utilities (`utilities`)\n\nUtilities include optional features like transactions, backup engine, and checkpoint.\n\n**Feature Isolation:** Utilities should be self-contained and not introduce unnecessary dependencies on core database internals.\n\n**Deprecation and Cleanup:** Legacy features are being phased out. When removing deprecated code, ensure that migration paths are documented and that users have sufficient warning.\n\n**Cross-Platform Compatibility:** Utilities often interact with OS-specific APIs. Ensure that code works on all supported platforms.\n\n### Options and Configuration (`options`)\n\nOptions define RocksDB's configuration system.\n\n**Type Safety:** Use appropriate types for options (e.g., `uint32_t` for flags, scoped enums for enumerated values).\n\n**Deprecation Policy:** When deprecating options, follow the project's policy. Document the deprecation, provide migration guidance, and maintain support for at least one major release.\n\n**Dynamic Configuration:** Some options can be changed dynamically. Ensure that dynamic changes are thread-safe and take effect correctly.\n\n**Validation:** Validate option values and provide clear error messages for invalid configurations.\n\n### Cache (`cache`)\n\nCache management is critical for RocksDB's performance.\n\n**Concurrency:** Cache operations are highly concurrent. Ensure that implementations are thread-safe and use appropriate synchronization primitives.\n\n**Performance:** Cache operations are in the hot path. Optimize for low latency and high throughput. Benchmark changes carefully.\n\n**Memory Management:** Cache implementations must manage memory carefully to avoid leaks and excessive allocations.\n\n**Eviction Policies:** Changes to eviction policies should be well-tested and benchmarked to ensure they improve overall performance.\n\n---\n\n## Code Review Checklist\n\nWhen reviewing RocksDB code (or preparing code for review), use this checklist:\n\n### Contract Boundaries\n- [ ] Is each behavior owned by the right layer? High-level policy (for example,\n  \"compaction wants this I/O mode\") should live at the caller/policy layer, while\n  lower layers should expose generic mechanisms (for example, \"open a fresh\n  reader\", \"skip shared cache insertion\", or \"use these FileOptions\").\n- [ ] Do comments and names describe local contracts rather than leaking a\n  specific caller's rationale into reusable APIs? Generic code should not need to\n  know about one current use case unless the API itself is intentionally\n  use-case-specific.\n- [ ] Does each flag or parameter control one coherent behavior? If one boolean\n  starts implying ownership, cache policy, I/O mode, prefetching, and caller\n  identity, split it into explicit flags or an options struct.\n- [ ] Could a future caller use this lower-level API without accidentally\n  inheriting assumptions from compaction, backup, user reads, or a particular\n  table format? If not, tighten the contract with assertions, clearer names, or\n  a narrower API.\n- [ ] Are implementation details not being used as policy signals? Prefer an\n  explicit contract over inferring behavior from incidental fields such as file\n  options, cache handles, or current table-reader state.\n\n### Correctness\n- [ ] Does the change preserve database semantics (e.g., snapshot isolation, key ordering)?\n- [ ] Are all error cases handled appropriately?\n- [ ] Is the change thread-safe? Are synchronization primitives used correctly?\n- [ ] Are there any potential data races or deadlocks?\n\n### Testing\n- [ ] Does the change include appropriate test coverage?\n- [ ] Are edge cases and failure modes tested?\n- [ ] Have the tests been run on all supported platforms?\n- [ ] Are stress tests passing?\n\n### Performance\n- [ ] Are there benchmark results for performance-sensitive changes?\n- [ ] Does the change avoid unnecessary allocations or copies?\n- [ ] Are hot paths optimized appropriately?\n\n### API and Compatibility\n- [ ] Is the change backwards compatible?\n- [ ] Are new APIs consistent with existing patterns?\n- [ ] Is the public API documented?\n- [ ] Are deprecated features handled according to policy?\n\n### Code Quality\n- [ ] Does the code follow RocksDB's style conventions?\n- [ ] Is the code clear and maintainable?\n- [ ] Are comments and documentation sufficient?\n- [ ] Are there any code smells or anti-patterns?\n\n---\n\n## Common Review Feedback Patterns\n\nThe following patterns emerged as frequent sources of review feedback:\n\n1. **Test Coverage:** Reviewers frequently request additional tests for edge cases, platform-specific behavior, and failure modes. Complex changes require comprehensive test coverage including unit tests, integration tests, and stress tests.\n\n2. **Error Handling:** Ensure proper error propagation using RocksDB's `Status` type. Avoid silent failures and provide clear error messages that include context about what failed and why.\n\n3. **API Design:** New APIs should be consistent with existing patterns. Use descriptive names that follow established conventions. Avoid breaking changes without strong justification and a clear deprecation plan.\n\n4. **Documentation:** Public APIs must be documented with usage examples and notes on thread safety, performance characteristics, and compatibility considerations. Complex internal logic should also be well-commented.\n\n5. **Performance:** Performance-sensitive changes require benchmark results to validate improvements. Use `db_bench` and other profiling tools to measure impact. Avoid premature optimization that adds complexity without measurable benefit.\n\n6. **Concurrency:** Thread safety is critical in RocksDB. Document synchronization assumptions clearly. Use appropriate memory ordering semantics. Consider potential race conditions and deadlocks.\n\n7. **Code Style:** Follow existing conventions for naming, formatting, and structure. Use `.clang-format` for consistent formatting. Prefer scoped enums (`enum class`) over unscoped enums.\n\n8. **Backwards Compatibility:** RocksDB maintains strong compatibility guarantees. Breaking changes require extensive justification. When deprecating features, provide migration guidance and maintain support across multiple releases.\n\n9. **Refactoring:** Reviewers appreciate refactoring that improves code readability and maintainability. Look for opportunities to deduplicate code and simplify complex logic.\n\n10. **Platform Compatibility:** Ensure changes work correctly on all supported platforms (Linux, Windows, macOS) and with all supported compilers (GCC, Clang, MSVC).\n\n11. **Contract Boundary Leaks:** When a change plumbs a new option or use-case\nspecific behavior through multiple subsystems, review the call chain for\ncontract leaks. Caller-specific rationale belongs at the call site or public API\ndocumentation; reusable layers should expose precise, layer-local capabilities.\nWatch especially for comments mentioning one caller in generic code, booleans\nthat silently bundle several behaviors, and downstream code inferring policy\nfrom an implementation detail instead of an explicit option.\n\n---\n\n## Important tips\n\n### Pull request and diff summaries\n* Before writing or updating an external RocksDB pull request summary or its\n  corresponding internal Phabricator diff summary, read and follow\n  `claude_md/pull_request_summary_guideline.md`.\n\n### Build system\n* There are 3 build system. Make for git clones, BUCK (meta internal) for hg\n  clones, and CMake for some special cases.\n* When a new .cc file is added, update Makefile, CMakeLists.txt, src.mk, BUCK.\n* Don't manually edit BUCK file, after updating src.mk, run\n    /usr/local/bin/python3 buckifier/buckify_rocksdb.py to update it\n* For -j in make command, use the number of CPU cores to decide it.\n* When searching for references to something (a symbol, library, etc.), do not\n  restrict or truncate your search based on presumed relevance or scope. It is\n  important and time-saving to keep the repo reasonably consistent across\n  different build systems, programming languages, and even between\n  documentation and implementation.\n\n### Avoiding mixed build modes with Make (use `AUTO_CLEAN=1`)\n\nObject files are written to the same paths regardless of build flags, so\nreusing objects from a prior build with different flags causes confusing\nlinker errors, etc. This problem is essentially avoidable by ALWAYS using\n`AUTO_CLEAN=1 make -j<n> <something>` for manual make invocations. This\nwill automatically clean object files if the build parameters/flavor have\nchanged. The `build_tools/rockstest.sh` / `rocksptest.sh` helpers described\nbelow set `AUTO_CLEAN=1` for you.\n\n`AUTO_CLEAN=1` does not fix Make failures associated with stale .d files\nreferring to removed files. Resolve that manually or with `make clean`\nwithout complaining to the user.\n\n### Source checks\n* Run `make check-sources` before committing. This catches non-ASCII\n    characters in source files and other source-level issues that CI will\n    reject. In particular, **do not use Unicode characters** (em dashes,\n    smart quotes, etc.) in comments or strings -- use ASCII equivalents\n    (`--` instead of em dash, `'` instead of smart quote, etc.).\n\n### License headers\n* Every new source file needs a license header. For a file that does **not**\n    carry an outside/third-party copyright, use the standard Meta dual-licensed\n    header (the dual-license designation is required -- a bare\n    \"All Rights Reserved\" copyright is not an acceptable open-source header):\n    ```\n    //  Copyright (c) Meta Platforms, Inc. and affiliates.\n    //  This source code is licensed under both the GPLv2 (found in the\n    //  COPYING file in the root directory) and Apache 2.0 License\n    //  (found in the LICENSE.Apache file in the root directory).\n    ```\n    Use a `#` comment prefix instead of `//` for shell, Python, and Makefile\n    fragments.\n* Files derived from an external source (e.g. LevelDB) keep their original\n    upstream copyright line in addition to the header above.\n\n### RTTI and dynamic_cast\n* Production code and `db_stress` must build in **release mode\n    (`-fno-rtti`)**. Do not use `dynamic_cast` anywhere except unit tests.\n    Use `static_cast_with_check` from `util/cast_util.h` (validates with\n    `dynamic_cast` in debug builds, plain `static_cast` in release).\n* Unit tests (`*_test.cc`) are built in debug mode with RTTI enabled.\n\n### Cross-platform / portability\nLocal `make` only exercises Linux with GCC/Clang, but CI\n(`.github/workflows/pr-jobs.yml` and `nightly.yml`) gates on a much wider\nmatrix, so portability breaks are invisible locally until CI fails. Code must\nbuild (and where noted, run tests) across:\n\n| Axis | Must support |\n|------|--------------|\n| OS | Linux (x86_64 + ARM), macOS, Windows |\n| Architecture | Little-endian and big-endian targets, including Linux on s390x |\n| Compiler | GCC, Clang (libstdc++ **and** libc++), AppleClang, **MSVC (VS2022)**, MinGW (Linux cross-compile, build-only, no gflags) |\n| Build system | Make, CMake, and BUCK (internal) -- keep all in sync (see \"Build system\" above) |\n| Config | release (`-fno-rtti`), `ASSERT_STATUS_CHECKED`, ASAN/UBSAN/TSAN, folly, unity build, JNI/Java |\n\nTreat these as constraints to satisfy and infer the specifics from them before\nadding any system header, libc call, or compiler-specific construct. The most\ncommon trap: anything that compiles under GCC/Clang on Linux but not under\n**MSVC/MinGW** -- e.g. unguarded POSIX-only headers/functions (`<unistd.h>`,\n`<sys/*.h>`, `getpid`, `_exit`, ...) or GCC/Clang extensions\n(`__attribute__`, `__builtin_*`, VLAs, `alloca`). Prefer the `port::`/`Env`\nabstractions; otherwise guard with `#ifdef OS_WIN` (POSIX `<unistd.h>` ->\nWindows `<process.h>`). Because libc++ is also tested, include what you use\nrather than relying on libstdc++ transitive includes.\n\nDo not use `static_assert` to reject a supported architecture for an optional\nfeature. Check an existing `port::` capability such as `port::kLittleEndian`\nand disable only the unsupported feature so the rest of RocksDB still builds.\nUse a portable representation when the feature itself must work across\narchitectures.\n\n### Unit Test\n* After all of the unit tests are added, review them and try to extract common\n    reusable utility functions to reduce code duplication due to copy past between\n    unit tests. This should be done every time unit test is updated.\n* Don't use sleep to wait for certain events to happen. This will cause test to\n    be flaky. Instead, use sync point to synchronize thread progress.\n* Cap unit test execution with 60 seconds timeout.\n* To build and run unit tests locally, prefer these helper scripts:\n    * `build_tools/rocksptest.sh <test_binary> [more_binaries...] [args...]`\n        builds the binary(ies) with parallel make and `AUTO_CLEAN=1` and runs\n        them under gtest-parallel, sharding the test cases across CPUs. Prefer\n        this whenever running more than a couple of test cases, e.g.\n        `build_tools/rocksptest.sh table_test` or\n        `build_tools/rocksptest.sh db_test env_test --gtest_filter=*Foo*`.\n    * `build_tools/rockstest.sh <test_binary> [args...]` builds with parallel\n        make and `AUTO_CLEAN=1` and runs the binary directly (serially).\n        Use it only for a very small number of test cases, e.g.\n        `build_tools/rockstest.sh db_test --gtest_filter=*MixedSlowdown*`.\n* After writing a test, stress-test for flakiness (AUTO_CLEAN handles the\n    rebuild needed by the `COERCE_CONTEXT_SWITCH=1` flag change):\n    ```bash\n    COERCE_CONTEXT_SWITCH=1 build_tools/rockstest.sh {test_binary} -r100 \\\n        --gtest_filter=\"*YourTestName*\"\n    ```\n* For CI-style flaky tests that do not reproduce with `gtest_parallel.py`,\n    `--gtest_repeat`, or normal coerce-mode runs, inspect\n    `tools/gtest_parallel_repro.py --help`.\n* Each unit test file has overheads, so avoid creating new unit test files\n  for random minor features. Consider adding to slice_test, db_etc3_test, or\n  others.\n\n### Unit test dedup guidelines\n* Extract helper functions for repeated patterns such as object\n    construction, round-trip (encode → decode → verify), and common\n    assertion sequences.\n* Use table-driven tests (struct array + loop) when multiple test cases\n    share the same logic but differ only in input/expected data.\n* Prefer randomized tests over exhaustive parameter permutations. Use\n    `Random` from `util/random.h` (not `std::mt19937`). Use a time-based\n    seed with `SCOPED_TRACE(\"seed=\" + std::to_string(seed))` so failures\n    are reproducible.\n* Keep deterministic edge-case tests separate from randomized tests\n    (error paths, boundary conditions, format verification).\n* Methods only used in tests should be private with `friend class` +\n    `TEST_F` fixture wrappers. In wrappers, always fully qualify the\n    target method to avoid infinite recursion.\n\n### Adding new public API\n    Refer to claude_md/add_public_api.md\n\n### Changing existing public API behavior\n    Follow the Behavioral Compatibility requirements above.\n\n### Adding new option\n    Refer to claude_md/add_option.md\n\n### Removing deprecated option\n    Refer to claude_md/remove_option.md\n\n### Metrics\n* When adding a new feature, evaluate whether there is opportunity to add\n    metrics. Try to avoid causing performance regression on hot path when adding\n    metrics.\n\n### Stress test\n* When adding a new feature, make sure stress test covers the new option.\n\n### Component docs\n* For component-level design notes and implementation walkthroughs, start with\n    `docs/components/index.md`.\n* Documentation under `docs/components/` is organized by subsystem in\n    `docs/components/<area>/`.\n* Each subsystem directory should have an `index.md` entry point plus focused\n    chapter files for deeper topics.\n\n### DB bench update\n* When adding a performance related feature, support it in db_bench\n\n### Adding release note\n* Release note should be kept short at high level for external user consumption.\n    Release notes identify what users might care about most in a release. They\n    are not exhaustive and are not a guide. PLEASE learn from past agents who\n    tried to build elaborate release notes with implementation details and\n    elsewhere-documented nuance. That wastes time. Fight the bias that\n    \"my change\" is important so must be worthy of release note mention.\n* If more than single markdown line, consider how their formatting will be\n    integrated into HISTORY.md.\n\n### Blog posts (docs/_posts)\n* Blog post authors must be defined in `docs/_data/authors.yml` to be displayed\n\n### Final verification of the change\n* Execute `AUTO_CLEAN=1 make check` to build all of the changes and execute all\n    of the tests. `AUTO_CLEAN=1` ensures a clean rebuild if your previous build\n    used different parameters. Note that executing all of the tests could take\n    multiple minutes.\n* Run `AUTO_CLEAN=1 ASSERT_STATUS_CHECKED=1 make check` to verify all Status\n    objects are properly checked. This catches missing error handling that can\n    lead to silent data corruption. Merely building with ASSERT_STATUS_CHECKED=1\n    accomplishes nothing; it enables a runtime check. New unit tests missing\n    Status checks is a common failure point, even from agents.\n\n### Monitoring make check progress\n* Use `make check-progress` to get machine-parseable JSON progress while\n    `make check` is running. This is useful for Claude Code to monitor long\n    builds without timeout issues.\n* Run `make check` in background, then poll progress:\n    ```bash\n    AUTO_CLEAN=1 make check &\n    # Poll periodically:\n    make check-progress\n    ```\n* The output shows current phase and progress:\n    ```json\n    {\"status\":\"running\",\"phase\":\"compiling\",\"completed\":300,\"total\":919,...}\n    {\"status\":\"running\",\"phase\":\"testing\",\"completed\":1500,\"total\":29962,\"failed\":0,\"percent\":5,...}\n    {\"status\":\"completed\",\"phase\":\"testing\",\"completed\":29962,\"total\":29962,\"failed\":0,\"percent\":100,...}\n    ```\n* Phases: `compiling` -> `linking` -> `generating` -> `testing` -> `completed`\n* Key fields: `status`, `phase`, `completed`, `total`, `failed`, `percent`\n* When tests fail, `failed_tests` array shows details (up to 10 failures):\n    ```json\n    {\"status\":\"running\",...,\"failed\":3,\"failed_tests\":[\n      {\"test\":\"cache_test-CacheTest.Usage\",\"exit_code\":1,\"signal\":0,\"output\":\"...test log...\"},\n      {\"test\":\"env_test-EnvTest.Open\",\"exit_code\":0,\"signal\":11,\"output\":\"...Segmentation fault...\"}\n    ]}\n    ```\n* `exit_code`: non-zero means test assertion failed\n* `signal`: non-zero means test was killed (e.g., 9=SIGKILL, 6=SIGABRT, 11=SIGSEGV)\n* `output`: last 50 lines of test log including error messages and stack traces\n\n### Executing benchmark using db_bench\n* Since the goal is to measure performance, we need to build a release binary\n    using `AUTO_CLEAN=1 DEBUG_LEVEL=0 make db_bench`. If there is an engine\n    crash due to a bug, switch back to a debug build with\n    `AUTO_CLEAN=1 make dbg`; `AUTO_CLEAN=1` handles the release<->debug rebuild\n    automatically.\n\n### Formatting code\n* After making change, use `make format-auto` to auto-apply formatting without\n    interactive prompts (Claude Code friendly).\n","tools/cpu_corruption_injector/README.md":"# CPU Corruption Injector\n\n## Overview\n\nThis tool measures the **outcome distribution** over many `db_stress` test runs.\nIn each `db_stress` test run, a single CPU-register bit-flip is injected into\nexactly one `db_stress` operation (a write, flush, or compaction) running under\n`gdb`. Aggregating over many such runs answers \"when the CPU corrupts one\ninstruction inside that op, how often does RocksDB catch it, crash, silently\nlose/return wrong data, or absorb it with no effect?\".\n\nIt has three layers:\n\n- **Detection** (`db_stress --verify_cpu_corruption_dir`): right after the\n  injected op, `db_stress` reads the whole keyspace back and compares against its\n  expected state, writing any finding to a `data_corruption.*.json` file.\n- **Injection** (`injector*.py`): runs inside `gdb`, navigates to a randomly\n  chosen instance of the op, stops at a random \"critical\" instruction -- one of\n  the two kinds that can carry a fault into data: a **move** carrying a value\n  between CPU and memory (a general-purpose or vector register), or a\n  **branch/jump** (the `eflags` register) -- and flips one random bit in the\n  register it uses. Control registers (`rsp`/`rbp`/`rip`/segment) are left alone.\n- **Orchestration** (`runner*.py`): builds the run set, launches `gdb` per run,\n  classifies each outcome, and aggregates them.\n\n## Requirements\n\n- A `db_stress` binary built with debug info and no inlining, so `gdb` can set\n  breakpoints on the injection-site functions and read their source lines:\n\n  ```bash\n  make DEBUG_LEVEL=0 EXTRA_CXXFLAGS=\"-g -fno-inline\" db_stress\n  ```\n\n- `gdb`. Defaults to `/usr/bin/gdb`; override with the `ICC_GDB` env var if the\n  telemetry's source resolves to `@ ?:0` (a `gdb` too old to read this build's\n  debug info).\n- Optional per-run timeout via the `ICC_RUN_TIMEOUT` env var (seconds, default\n  `600`). One hung `gdb`+`db_stress` cannot block the rest of the set.\n\n## Entry point: `runner.py`\n\nA **campaign** is many `db_stress` test **runs** of one op type. Each run is a\nfull single-threaded `db_stress` test that performs `ops_per_thread` ops, but the\ninjector corrupts exactly **one** op instance of the chosen type in that run\n(e.g. the 51st Put of that run); the run is then classified into a single outcome\nbucket.\n\n- `--op` is one of `write`, `flush`, `compaction`.\n- `--parallel N` runs `N` runs at once (each `db_stress` run is itself\n  single-threaded, so raise this to use more cores).\n- `--seed N` sets the campaign's `base_seed`: run `i` deterministically uses seed\n  `N+i`, which drives both the injection choices and `db_stress`'s own `--seed`, so\n  the whole set is reproducible from `base_seed` alone. Omit `--seed` to draw one\n  fresh random `base_seed` per campaign (chosen once per `runner.py` run and logged as `base_seed=N`); pass that `N` back via `--seed`\n  to replay the set, or `--seed=<N+i>` with `--runs 1` to replay just run `i`.\n\nIn the examples below, `<db_stress>` is the path to the `db_stress` binary you\nbuilt (see [Requirements](#requirements) above -- e.g. `./db_stress`), and\n`<dir>` is a writable directory for the campaign's output.\n\n```bash\n# a compaction campaign of 100 runs\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir>\n\n# a flush campaign of 200 runs, 8 in parallel\npython3 tools/cpu_corruption_injector/runner.py --op flush --runs 200 \\\n    --stress_cmd <db_stress> --report_dir <dir> --parallel 8\n\n# replay an earlier campaign: pass its logged base_seed back as --seed\n# (the runner prints \"reproduce with --seed=<base_seed>\"); base_seed is in [1, 4294967295]\npython3 tools/cpu_corruption_injector/runner.py --op write --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir> --seed 3141592653\n```\n\nBefore doing any work, `runner.py` preflights the build: it confirms `gdb` can\nset breakpoints on the op's injection-site functions and read their source\nlines, and fails fast otherwise.\n\n## Outputs\n\nEverything lands under `--report_dir`: two campaign-wide files at the top level,\nplus one `run_XXXXX/` subdirectory per run.\n\n```text\n<report_dir>/\n├── summary.json          # campaign-wide: outcome_counts + a record per run\n├── runner.log            # campaign-wide: runner logging (also echoed to console)\n├── run_00000/            # one subdirectory per run\n│   ├── inject.json                 # what the injector did (WHERE / WHAT / HOW)\n│   ├── data_corruption.<tid>.json  # the finding, only if this run flagged an SDC/corruption\n│   ├── gdb.log                     # this run's gdb output\n│   ├── db/                         # this run's db_stress DB (working dir)\n│   └── exp/                        # this run's expected-values (working dir)\n├── run_00001/\n│   └── ...\n└── ...\n```\n\nSo `summary.json` and `runner.log` are at the top of `--report_dir`; the\nper-run `gdb.log` / `inject.json` / `data_corruption.*.json` live inside each\n`run_XXXXX/`.\n\nOutcome buckets:\n\n- **SDC**: silent data corruption -- the read-back succeeded but returned the\n  wrong result (a lost key, a resurrected key, or a wrong value).\n- **CORRUPTION**: `db_stress` detected a corruption via an integrity check\n  (`Status::Corruption`).\n- **CRASH**: the injected corruption crashed `db_stress` (a fatal signal).\n- **NO_EFFECT**: the corruption landed but the run finished with correct data.\n- **NO_INJECTION**: no bit was flipped this run. The op instance, its\n  `target_fn`, and the instruction to corrupt are all picked **randomly** up\n  front, so a run can occasionally target something it never reaches -- a random\n  op instance beyond the ops this run actually performed, or a\n  critical-instruction index that no later `target_fn` call happens to have.\n  Should be rare; a high count means the injection sites (or the random ranges)\n  need revisiting.\n- **ERROR**: a harness/framework failure, **not** a `db_stress` data outcome --\n  the injector hit a bug, `gdb` died before writing `inject.json`, or the run hit\n  the `ICC_RUN_TIMEOUT` cap. Expected to be **0**; any non-zero count is a\n  framework bug worth investigating.\n\n## Reading a run's output across the 3 layers\n\nEach run threads through all three layers: the injector records what it corrupted\n(`inject.json`), `db_stress` records what the post-op read-back found\n(`data_corruption.<tid>.json`), and the runner rolls every run up into\n`summary.json`. The examples below are from a real 40-run compaction campaign:\n\n```bash\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 40 \\\n    --seed 424242 --stress_cmd <db_stress> --report_dir <dir>\n```\n\n**Orchestration layer** -- `summary.json`'s `outcome_counts` (how many of the\ncampaign's runs landed in each bucket), the whole campaign at a glance:\n\n| SDC | CORRUPTION | CRASH | NO_EFFECT | NO_INJECTION | ERROR |\n| --- | ---------- | ----- | --------- | ------------ | ----- |\n|   2 |         10 |     0 |        25 |            3 |     0 |\n\n### A silent data corruption (SDC): `run_00023`\n\n**Injection layer** -- `run_00023/inject.json`: an `eflags` flag-flip on the\ncompaction iterator's key-copy path; the op did NOT crash\n(`db_stress_crash_signal: null`):\n\n```json\n{\n  \"injection_result\": \"injected\",\n  \"db_stress_crash_signal\": null,\n  \"op\": \"compaction\",\n  \"op_index\": 6,\n  \"entry_fn\": \"rocksdb::CompactionJob::Run\",\n  \"target_fn\": \"rocksdb::CompactionIterator::NextFromInput\",\n  \"critical_instruction_index\": 0,\n  \"corruptions\": [\n    {\n      \"instruction\": \"cmp    $0x40,%rdx\",\n      \"register\": \"eflags\",\n      \"corruption_type\": \"flag_flip\",\n      \"before\": \"0x287\",\n      \"after\": \"0x286\",\n      \"details\": {\n        \"source\": \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n        \"call_chain\": [\n          \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n          \"rocksdb::IterKey::SetKeyImpl @ ./db/dbformat.h:941\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:741\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:749\",\n          \"rocksdb::CompactionIterator::NextFromInput @ db/compaction/compaction_iterator.cc:781\"\n        ]\n      }\n    }\n  ],\n  \"ops_seen\": 6,\n  \"critical_instructions_seen\": 1\n}\n```\n\n**Detection layer** -- `run_00023/data_corruption.<tid>.json`: the post-op\nread-back found a committed key missing:\n\n```json\n{\n  \"kind\": \"lost\",\n  \"cf\": 0,\n  \"key\": 202,\n  \"value_from_db\": \"\",\n  \"value_from_expected\": \"010000000504070609080B0A0D0C0F0E\",\n  \"op_status\": \"Get: NotFound\"\n}\n```\n\nReading it: the flag flip mis-copied the compaction output key, dropping key 202\nfrom the output SST. The op returned OK and no checksum fired, but reading key\n202 back returns `NotFound` for a committed key, so the runner classifies the run\n`SDC` (`kind=lost`) -- the bug class this tool exists to surface.\n\n## Auxiliary entry point: `injector.py`\n\n`injector.py` is **not run on its own** -- there is no `python3 injector.py`\nusage. It only works inside `gdb`'s embedded Python (it does `import gdb`), so\n`runner.py` runs it by launching `gdb` with the injector as gdb's script. Each\nrun's invocation looks like:\n\n```bash\ngdb --batch --nx \\\n    -iex 'py import sys; sys.argv=[...]' \\\n    -x tools/cpu_corruption_injector/injector.py \\\n    --args <db_stress> <db_stress flags...>\n```\n\n- `--batch` runs `gdb` non-interactively and exits when the script finishes;\n  `--nx` skips the user's `~/.gdbinit` so their config can't change behavior.\n- `-iex 'py ... sys.argv=[...]'` runs a Python command *before* the script loads,\n  seeding `injector.py`'s `sys.argv` with its parameters (`--op`, `--op_index`,\n  `--entry_fn`, `--target_fn`, `--seed`, `--dir`) -- gdb otherwise hands a `-x`\n  script an empty argv.\n- `-x tools/cpu_corruption_injector/injector.py` is the script `gdb` executes in\n  its embedded Python.\n- `--args <db_stress> <db_stress flags...>` is the program `gdb` launches and\n  debugs -- the `db_stress` binary and its flags, which `gdb` starts, stops\n  mid-op, and corrupts.\n","tools/c_api_gen/README.md":"# RocksDB C API Code Generation Prototype\n\nThis directory contains a **prototype** for semi-automating parts of\nRocksDB's C API based on the existing C++ public API and the current C API\nconventions in `include/rocksdb/c.h` / `db/c.cc`.\n\nThe intent is **not** to automatically wrap arbitrary C++ APIs. Instead, the\ngoal is to reduce maintenance burden for the parts of the C API that are\nalready highly mechanical today.\n\n## Why a semi-automated approach\n\nRocksDB's C API follows stable conventions that downstream users rely on:\n\n- opaque handle types like `rocksdb_t*`, `rocksdb_transaction_t*`\n- `Status` translated to `char** errptr`\n- `Slice` translated to `const char*` + `size_t`\n- binary/string results copied into `malloc()`-owned buffers\n- booleans represented as `unsigned char`\n- `rocksdb_<object>_<verb>[_cf][_with_ts]` naming\n\nThese conventions are valuable and should remain the source of truth for the\ngenerated code.\n\nAt the same time, the C++ public API includes features that are poor fits for\nfully automatic wrapper generation:\n\n- callback-backed polymorphic types (`Comparator`, `MergeOperator`, etc.)\n- complex object construction/open flows\n- ownership-transferring factory setters\n- vector-heavy marshalling APIs like the `MultiGet` family\n- virtual extension points and custom bridging logic\n\nFor those cases, hand-designed wrappers remain the right tool.\n\n## Why the spec-driven generator still exists\n\nThe spec-driven generator is still needed for wrappers whose C shape cannot be\nreliably inferred from the C++ declaration alone.\n\nYes, this means `spec.json` is manually maintained. That is intentional. The\ngoal is not to eliminate human decisions; the goal is to stop hand-writing the\nsame declaration/definition boilerplate once those decisions have been made.\n\nFor many wrappers, someone still has to decide:\n\n- the C function name and parameter order\n- whether a C++ `Status` becomes `char** errptr`\n- whether default C++ objects should be synthesized, such as `ReadOptions()`\n- how ownership and lifetime should work for pointers, factories, and callbacks\n- how vectors, maps, and option collections should be flattened into C\n- whether the C API should intentionally differ from the C++ API shape\n\nThose are API design choices, not mechanical translations. The spec-driven\npath keeps those choices explicit while still generating consistent boilerplate.\n\nBackward compatibility with the existing hand-written C API is one input, but\nit is not the primary reason this layer exists. Even for brand-new wrappers, we\nstill need an explicit policy layer for non-trivial C bindings.\n\n## What this prototype focuses on\n\nThe generator currently targets representative examples from the easiest and\nmost repetitive wrapper families:\n\n1. **Simple scalar field setters/getters**\n   - `rocksdb_options_set_create_if_missing`\n   - `rocksdb_options_get_create_if_missing`\n   - `rocksdb_readoptions_set_fill_cache`\n   - `rocksdb_writeoptions_set_sync`\n   - `rocksdb_block_based_options_set_block_size`\n   - `rocksdb_cuckoo_options_set_hash_ratio`\n\n2. **Simple forwarding wrappers with no `Status`**\n   - `rocksdb_writebatch_clear`\n   - `rocksdb_writebatch_put`\n   - `rocksdb_writebatch_put_cf`\n   - `rocksdb_writebatch_delete`\n   - `rocksdb_writebatch_put_log_data`\n   - `rocksdb_writebatch_set_save_point`\n   - `rocksdb_transaction_set_savepoint`\n\n3. **Simple forwarding wrappers with `Status` -> `char** errptr`**\n   - `rocksdb_put`, `rocksdb_put_cf`\n   - `rocksdb_delete`, `rocksdb_delete_cf`\n   - `rocksdb_merge`, `rocksdb_merge_cf`\n   - `rocksdb_write`\n   - `rocksdb_writebatch_rollback_to_save_point`\n   - `rocksdb_writebatch_pop_save_point`\n   - `rocksdb_transaction_put`, `rocksdb_transaction_put_cf`\n   - `rocksdb_transaction_merge`, `rocksdb_transaction_merge_cf`\n   - `rocksdb_transaction_delete`, `rocksdb_transaction_delete_cf`\n   - `rocksdb_transaction_commit`\n   - `rocksdb_transaction_rollback`\n   - `rocksdb_transaction_rollback_to_savepoint`\n\n4. **Simple metadata accessors**\n   - `rocksdb_flushjobinfo_cf_name`\n   - `rocksdb_flushjobinfo_largest_seqno`\n\nThis is intentionally a constrained subset. The point is to demonstrate a\nmaintainable pattern and a spec format that can be extended gradually.\n\n## What should remain manual\n\nThese families should stay hand-written unless a future design adds a much\nricher generator:\n\n- comparators / merge operators / compaction filters / event listeners\n- compaction service wrappers\n- openers and constructors that build vectors/maps of descriptors/options\n- `MultiGet` / batched `MultiGet` families\n- wrappers involving `std::shared_ptr` / `std::unique_ptr` ownership transfer\n- C APIs whose behavior intentionally differs from the C++ API shape\n\n## Design principles\n\n### 1. Keep the current C API conventions\n\nThe code generator should not invent a new style. It should emit code that\nlooks like today's hand-written wrappers:\n\n- `SaveError(errptr, ...)`\n- `Slice(key, keylen)`\n- direct field assignments for plain option setters\n- same function names and signatures\n\n### 2. Let auto-discovery handle the simple direct cases\n\nFor a small set of mechanically mappable public structs, the generator can\ndiscover missing bindings directly from the C++ headers and emit the missing C\nwrappers automatically. Existing handwritten wrappers still win when they\nalready exist.\n\nToday this strict auto-discovery path is used for:\n\n- simple `ReadOptions` scalar / enum fields\n- simple scalar / enum fields across selected public option structs\n- simple metadata fields on listener/job-info structs\n- simple metadata view structs such as table-properties and compaction metadata\n\nFor those managed families, unsupported or intentionally deferred fields must\nbe explicitly recorded in `auto_simple_bindings_blocklist.json` rather than\nbeing skipped silently. Anything outside those families remains hand-written.\n\n### 3. Keep explicit spec for non-trivial wrappers\n\nThe spec-driven generator remains the right tool for method-style wrappers and\nother APIs whose C surface requires an explicit design decision. In practice:\n\n- auto-discovery owns simple direct field coverage for selected struct families\n- `spec.json` owns wrappers that are still manual in design but repetitive in\n  implementation\n- fully irregular ownership-heavy or callback-heavy APIs remain hand-written\n\n### 4. Let C++ headers guide validation, not policy\n\nLonger term, Clang/libTooling can help validate that a wrapper spec still\nmatches the underlying C++ method signature. But the C naming, ownership, and\nerror-handling policy should remain explicit in the spec.\n\n## Files\n\nSource templates (hand-written; NOT user-includable and NOT compiled directly):\n\n- `c_base.h`\n  - hand-written template for `include/rocksdb/c.h`; the generated `.h.inc`\n    fragments are inlined into it to produce the self-contained public header\n- `c_base.cc`\n  - hand-written template for `db/c.cc`; the generated `.cc.inc` fragments are\n    inlined into it to produce the compiled implementation\n\nGenerators and inputs:\n\n- `spec.json`\n  - declarative input for the spec-driven generator\n- `generate_c_api.py`\n  - emits header/source fragments from the spec\n- `auto_simple_bindings.py`\n  - auto-discovers simple public field bindings and generates checked-in\n    `.inc` files for them\n- `auto_simple_bindings_blocklist.json`\n  - checked-in exceptions for auto-managed fields that are intentionally manual\n    or temporarily deferred\n- `abi_type_overrides.json`\n  - per-function C type pins so already-shipped wrappers keep their historical\n    C signature even when the C++ field type maps to a different C type\n- `regen_all.py`\n  - orchestrates both generators and inlines the fragments into `c.h` / `c.cc`\n\nVerification (run by `make check-c-api-gen` and in CI):\n\n- `check_api_completeness.py`\n  - asserts every declared public C function has exactly one definition\n    (dependency-free; guards against link-time breakage of bindings)\n- `check_api_compatibility.py` + `api_compatibility_allowlist.json`\n  - signature-level backward-compatibility gate against a reference revision;\n    the authoritative ABI/API-stability check\n- `verify_generated_up_to_date.py`\n  - regenerates in a temp dir and confirms the checked-in output is current\n- `validate_generated_equivalence.py` + `equivalence_allowlist.json`\n  - best-effort migration aid: compares generated wrapper *bodies* against a\n    PRE-migration hand-written revision. Body comparison is heuristic; for\n    backward-compatibility rely on `check_api_compatibility.py`.\n\n## Toolchain requirements\n\nRegeneration needs two external tools:\n\n- **`clang++`** (libclang) — used to dump the C++ struct ASTs that drive\n  auto-discovery. Resolution order is `$CXX` (if it names a clang), then bare\n  `clang++`, then versioned fallbacks (`clang++-21` … `clang++-13`).\n- **`clang-format`** — used to canonicalize the generated `.inc` fragments (and\n  therefore the inlined `c.h` / `c.cc`).\n\nThe checked-in generated output is byte-reproducible only for a **pinned\nclang-format version**. CI uses **clang-format-21** (see\n`.github/workflows/pr-jobs.yml`); pin the same version locally so your\nregeneration matches CI:\n\n```bash\npython3 tools/c_api_gen/regen_all.py --clang-format clang-format-21\n# or, when running the staleness check via make:\nmake check-c-api-gen CLANG_FORMAT_BINARY=clang-format-21\n```\n\nIf `clang++` is not installed, `make check` skips the C API staleness check\nwith a message instead of failing, so it still works without the codegen\ntoolchain. CI is the authoritative gate.\n\nThe dedicated `build-linux-clang-21-no_test_run` CI job runs this target with\n`CHECK_C_API_GEN_STRICT=1`, which turns every such \"skip\" (missing `clang++` or\nclang-format, or an unresolvable compat baseline ref) into a hard error, so the\ncore CI coverage cannot silently regress to a no-op:\n\n```bash\nmake check-c-api-gen CHECK_C_API_GEN_STRICT=1 CLANG_FORMAT_BINARY=clang-format-21\n```\n\n## Running the generators\n\nFrom the repo root, to regenerate all checked-in fragments and the inlined\n`c.h` / `c.cc`:\n\n```bash\npython3 tools/c_api_gen/regen_all.py\n```\n\nThis regenerates:\n\n- the spec-driven fragments from `spec.json`\n- the auto-discovered fragments produced by `auto_simple_bindings.py`\n- the round-trip tests produced by `gen_roundtrip_tests.py`\n\nTo preview only the spec-driven output for one section without touching the\nchecked-in fragments, run `generate_c_api.py` directly with `--header-out` /\n`--source-out` pointing at a scratch path (e.g. under `/tmp`).\n\nTo verify the auto-discovered checked-in output is up to date:\n\n```bash\npython3 tools/c_api_gen/auto_simple_bindings.py --check\n```\n\nTo verify the full checked-in generated set is stable without relying on Git\nworktree metadata:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\n## Maintaining Auto-Managed Families\n\nWhen a new public field is added to an auto-managed family, use this decision\nprocess:\n\n1. If it is a simple scalar, enum, string, or supported chrono field and the\n   desired C API shape matches the existing conventions, do not hand-edit\n   `include/rocksdb/c.h` or `db/c.cc`. Run `python3 tools/c_api_gen/regen_all.py`\n   and let `auto_simple_bindings.py` generate the wrapper.\n2. If the field needs an explicit C API design because of ownership, callbacks,\n   vectors, maps, nested structs, or intentionally different C naming/behavior,\n   keep it out of auto-generation by adding an entry to\n   `tools/c_api_gen/auto_simple_bindings_blocklist.json` with\n   `\"policy\": \"manual\"`.\n3. If the field belongs to an auto-managed family but you intentionally want to\n   postpone C API coverage for a short time, add a blocklist entry with\n   `\"policy\": \"deferred\"` and a concrete reason. Include `tracking_issue` when\n   you have one.\n4. If none of the above applies, the build should fail. Extend\n   `auto_simple_bindings.py`, add a spec-driven wrapper, or add a hand-written\n   wrapper and then update the blocklist policy accordingly.\n\nThe blocklist is intentionally strict:\n\n- each entry must identify the managed family and field\n- each entry must have a non-empty reason\n- policy must be either `manual` or `deferred`\n- stale entries fail regeneration if the field disappears or is renamed\n\nExample deferred entry:\n\n```json\n{\n  \"name\": \"ReadOptions\",\n  \"entries\": [\n    {\n      \"field\": \"future_slice_option\",\n      \"policy\": \"deferred\",\n      \"reason\": \"Needs an explicit C buffer ownership design before exposing it.\",\n      \"tracking_issue\": \"T123456789\"\n    }\n  ]\n}\n```\n\nThe blocklist only applies to the auto-managed families handled by\n`auto_simple_bindings.py`. It is not a substitute for `spec.json`, which still\nowns non-trivial method-style wrappers. It is also unrelated to\n`equivalence_allowlist.json`, which only suppresses intentional diff mismatches\nin the equivalence checker.\n\nTo refresh the full checked-in generated set and confirm nothing changes:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\nTo verify active generated wrappers are equivalent to the handwritten wrappers\nfrom a reference revision:\n\n```bash\npython3 tools/c_api_gen/validate_generated_equivalence.py --ref HEAD\n```\n\nThis checks the generated fragments currently included by\n`include/rocksdb/c.h` and `db/c.cc` against `HEAD:include/rocksdb/c.h` and\n`HEAD:db/c.cc`. Known historical inconsistencies can be documented in\n`equivalence_allowlist.json` with a reason instead of being silently ignored.\n\n## Suggested migration path\n\n1. Start with generated preview fragments only.\n2. Migrate a few low-risk existing wrappers to generated sections.\n3. Keep manual and generated sections clearly separated.\n4. Let auto-discovery pick up new simple public fields automatically.\n5. Extend the spec or keep manual wrappers for complex/manual families.\n\nThis incremental approach minimizes downstream impact while still reducing\nmaintenance burden over time.\n","tools/c_api_gen/spec.json":"{\n  \"sections\": [\n    {\n      \"name\": \"DB data operations\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge_cf\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_range_cf\",\n          \"call_expr\": \"db->rep->DeleteRange\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"start_key\",\n              \"len_name\": \"start_key_len\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"end_key\",\n              \"len_name\": \"end_key_len\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(start_key, start_key_len)\",\n            \"Slice(end_key, end_key_len)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_cf\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_wal\",\n          \"call_expr\": \"db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_pause_background_work\",\n          \"call_expr\": \"db->rep->PauseBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_continue_background_work\",\n          \"call_expr\": \"db->rep->ContinueBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_disable_file_deletions\",\n          \"call_expr\": \"db->rep->DisableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_enable_file_deletions\",\n          \"call_expr\": \"db->rep->EnableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_checksum\",\n          \"call_expr\": \"db->rep->VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_file_checksums\",\n          \"call_expr\": \"db->rep->VerifyFileChecksums\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": [\n            \"ReadOptions()\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_destroy_db\",\n          \"call_expr\": \"DestroyDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_repair_db\",\n          \"call_expr\": \"RepairDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"WriteBatch\",\n      \"functions\": [\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_clear\",\n          \"call_expr\": \"b->rep.Clear\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_cf\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_delete\",\n          \"call_expr\": \"b->rep.Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_log_data\",\n          \"call_expr\": \"b->rep.PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_set_save_point\",\n          \"call_expr\": \"b->rep.SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_rollback_to_save_point\",\n          \"call_expr\": \"b->rep.RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_pop_save_point\",\n          \"call_expr\": \"b->rep.PopSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_verify_checksum\",\n          \"call_expr\": \"b->rep.VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"Transaction\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put_cf\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge_cf\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete_cf\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_commit\",\n          \"call_expr\": \"txn->rep->Commit\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback\",\n          \"call_expr\": \"txn->rep->Rollback\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_put_log_data\",\n          \"call_expr\": \"txn->rep->PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_set_savepoint\",\n          \"call_expr\": \"txn->rep->SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback_to_savepoint\",\n          \"call_expr\": \"txn->rep->RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDB simple\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put_cf\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge_cf\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete_cf\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_wal\",\n          \"call_expr\": \"txn_db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_cf\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_data_block_hash_ratio\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.data_block_hash_table_util_ratio\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_top_level_index_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.top_level_index_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_partition_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.partition_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_unpartitioned_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.unpartitioned_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"JobInfo metadata simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.input_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.output_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_elapsed_micros\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.elapsed_micros\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_corrupt_keys\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_corrupt_keys\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_input_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_output_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_input_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_input_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_output_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_output_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files_at_output_level\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files_at_output_level\"\n        },\n        {\n          \"kind\": \"string_field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cf_name\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"len_type\": \"size_t*\",\n          \"len_name\": \"size\",\n          \"expr\": \"info->rep.cf_name\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cur\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.cur)\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_prev\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.prev)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CuckooOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_cuckoo_options_set_hash_ratio\",\n          \"receiver_type\": \"rocksdb_cuckoo_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.hash_table_ratio\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Options simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"zstd_max_train_bytes\",\n          \"field\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"unsigned char\",\n          \"value_name\": \"use_zstd_dict_trainer\",\n          \"field\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"value\",\n          \"field\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"uint64_t\",\n          \"value_name\": \"max_dict_buffer_bytes\",\n          \"field\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_bottommost_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.bottommost_compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"use_fsync\",\n          \"field\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_disable_auto_compactions\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"disable\",\n          \"field\": \"opt->rep.disable_auto_compactions\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_optimize_filters_for_hits\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.optimize_filters_for_hits\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_report_bg_io_stats\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.report_bg_io_stats\"\n        }\n      ]\n    }\n  ]\n}\n","tools/c_api_gen/auto_simple_bindings_blocklist.json":"{\n  \"schema_version\": 1,\n  \"families\": [\n    {\n      \"name\": \"ReadOptions\",\n      \"entries\": [\n        {\n          \"field\": \"snapshot\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"timestamp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iter_start_ts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"merge_operand_count_threshold\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_lower_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_upper_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"table_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental index-selection compatibility policy that needs explicit legacy C API mapping.\"\n        },\n        {\n          \"field\": \"table_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Non-owning pointer paired with the legacy C read-options factory shim; the C wrapper owns a shared_ptr and stores this borrowed pointer.\"\n        },\n        {\n          \"field\": \"request_id\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_scoped_block_buffer_provider\",\n          \"policy\": \"manual\",\n          \"reason\": \"Field type 'ReadScopedBlockBufferProvider *' is a pointer/owning handle to a complex type; needs an explicit C ownership and lifetime design rather than a simple scalar/enum/string wrapper.\"\n        },\n        {\n          \"field\": \"custom_context\",\n          \"policy\": \"manual\",\n          \"reason\": \"Opaque non-owning pointer needs an explicit C ownership and lifetime design rather than a generated binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"DBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"mutex_hold_log_threshold_us\",\n          \"policy\": \"deferred\",\n          \"reason\": \"Experimental mutex diagnostics are configured through the existing DB option string API until the behavior and overhead are qualified.\"\n        },\n        {\n          \"field\": \"env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"sst_file_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"statistics\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"db_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"write_buffer_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"listeners\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"row_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"wal_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"file_checksum_gen_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"checksum_handoff_file_types\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"compaction_service\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"calculate_sst_write_lifetime_hint_set\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"max_manifest_file_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"writable_file_max_buffer_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses uint64_t but C++ field is size_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"AdvancedColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"inplace_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_insert_with_hint_prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compression_per_level\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"max_bytes_for_level_multiplier_additional\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_universal\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_fifo\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"table_properties_collector_factories\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"CompressionOptions is a nested struct; needs explicit C bridging (matches existing compaction_options_universal/fifo pattern).\"\n        },\n        {\n          \"field\": \"blob_direct_write_partition_strategy\",\n          \"policy\": \"manual\",\n          \"reason\": \"std::shared_ptr<BlobFilePartitionStrategy> \\u2014 factory/ownership-transfer type; needs explicit C bridging.\"\n        },\n        {\n          \"field\": \"soft_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"hard_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"comparator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"merge_operator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"bottommost_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"table_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"cf_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_thread_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"sst_partitioner_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"EnvOptions\",\n      \"entries\": [\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores an external object pointer that needs explicit ownership policy in the C API.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactRangeOptions\",\n      \"entries\": [\n        {\n          \"field\": \"full_history_ts_low\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        },\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OpenAndCompactOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"GetColumnFamilyMetaDataOptions\",\n      \"entries\": [\n        {\n          \"field\": \"range\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a range object that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedTableOptions\",\n      \"entries\": [\n        {\n          \"field\": \"flush_block_policy_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"metadata_cache_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"block_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"persistent_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"cache_usage_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"filter_policy\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"user_defined_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"use_udi_as_primary_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"fail_if_no_udi_on_open\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"index_mode\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental enum semantics plus legacy UDI boolean compatibility wrappers that need explicit mapping.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptionsFIFO\",\n      \"entries\": [\n        {\n          \"field\": \"file_temperature_age_thresholds\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses collection-style configuration that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BackupEngineOptions\",\n      \"entries\": [\n        {\n          \"field\": \"backup_env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"backup_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"restore_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CreateBackupOptions\",\n      \"entries\": [\n        {\n          \"field\": \"progress_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        },\n        {\n          \"field\": \"exclude_files_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"RestoreOptions\",\n      \"entries\": [\n        {\n          \"field\": \"alternate_dirs\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a collection of alternate directories that needs explicit marshalling.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"custom_mutex_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"lock_mgr_handle\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"rollback_deletion_type_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"secondary_indices\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_snapshot_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_commit_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"autogenerate_name\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"cmp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores a comparator-like object pointer that needs explicit ownership policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"shared_lock_buckets\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses shared internal synchronization state that should not be exposed as a blind field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"FlushJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"input_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"input_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_garbage_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"SubcompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ExternalFileIngestionInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TableProperties\",\n      \"entries\": [\n        {\n          \"field\": \"user_collected_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"readable_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        }\n      ]\n    }\n  ]\n}\n"},"files":{"tools/c_api_gen/abi_type_overrides.json":"{\n  \"schema_version\": 1,\n  \"description\": [\n    \"ABI-preserving C type overrides for auto-generated C API wrappers.\",\n    \"\",\n    \"RocksDB's C API has a strong backward-compatibility guarantee: the C\",\n    \"signature of a function that has already shipped must never change, even\",\n    \"when the underlying C++ field type would naturally map to a different C\",\n    \"type. The auto-generator derives the C type from the C++ field (e.g. bool\",\n    \"-> unsigned char, uint64_t -> uint64_t, an enum -> int). For a handful of\",\n    \"pre-existing functions the historical hand-written C type differs from\",\n    \"that natural mapping, so we pin it here. The generated body still casts to\",\n    \"the real C++ field type via static_cast<decltype(field)>(value), so the\",\n    \"behavior is identical -- only the public C parameter/return type is held\",\n    \"stable.\",\n    \"\",\n    \"Only add entries for functions that already shipped with a different type.\",\n    \"Brand-new functions should use the natural mapping. The equivalence\",\n    \"validator (validate_generated_equivalence.py) enforces that generated\",\n    \"signatures match the reference revision, so any unintended drift here will\",\n    \"fail CI.\"\n  ],\n  \"overrides\": [\n    {\n      \"function\": \"rocksdb_writeoptions_disable_WAL\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int disable` long before codegen; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_restore_options_set_keep_log_files\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int v`; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_checksum\",\n      \"role\": \"setter\",\n      \"c_type\": \"char\",\n      \"field_cxx_type\": \"ChecksumType\",\n      \"reason\": \"Shipped as `char`; the field is the ChecksumType enum but the C parameter type must stay `char` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_format_version\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"uint32_t\",\n      \"reason\": \"Shipped as `int`; the field is uint32_t but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_block_size\",\n      \"role\": \"setter\",\n      \"c_type\": \"size_t\",\n      \"field_cxx_type\": \"uint64_t\",\n      \"reason\": \"Shipped as `size_t block_size`; the field is uint64_t but the C parameter type must stay `size_t` for ABI compatibility.\"\n    }\n  ]\n}\n","tools/c_api_gen/equivalence_allowlist.json":"{\n  \"allowlist\": [\n    {\n      \"name\": \"rocksdb_transactiondb_options_set_use_per_key_point_lock_mgr\",\n      \"reason\": \"The old handwritten implementation existed in db/c.cc but was not declared in include/rocksdb/c.h. The generated declaration intentionally fixes that historical inconsistency.\"\n    }\n  ]\n}\n","tools/c_api_gen/api_compatibility_allowlist.json":"{\n  \"schema_version\": 1,\n  \"description\": [\n    \"Documented, intentional backward-incompatible changes to the public C API\",\n    \"(include/rocksdb/c.h), checked by check_api_compatibility.py.\",\n    \"\",\n    \"Each entry suppresses one otherwise-failing finding. 'kind' is 'removed'\",\n    \"(a function that existed in the baseline is gone) or 'changed' (its\",\n    \"signature changed). Only add entries for changes that are deliberate and\",\n    \"reviewed; every entry needs a reason.\"\n  ],\n  \"allow\": [\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_writebatch_wi_create_from\",\n      \"reason\": \"Declared in c.h but never implemented anywhere in RocksDB (WriteBatchWithIndex has no constructor from a serialized representation). The symbol never existed, so no consumer could have linked against it; the dead declaration was removed.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_user_key_common_prefix\",\n      \"reason\": \"Getter for the format_version 8 'user_key_common_prefix' table property, which a predecessor (D116105558) reserved for a whole-file common-prefix optimization that was investigated and rejected. The property and this generated getter are removed before format_version 8 (and thus the property) appears in any release, so no released consumer could depend on it.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_set_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_get_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_external_sst_file_global_seqno_offset\",\n      \"reason\": \"Removed after write_global_seqno was removed because RocksDB no longer mutates the global sequence number stored in external SST files during ingestion.\"\n    }\n  ]\n}\n","AGENTS.md":"# Agent Instructions\n\nThis repository's authoritative agent instructions live in `CLAUDE.md`.\n\nRead and follow [`CLAUDE.md`](./CLAUDE.md) in full before making changes or\nreviewing code in this checkout.\n\nIf there is any ambiguity between this file and `CLAUDE.md`, `CLAUDE.md` takes\nprecedence.\n","tools/advisor/README.md":"# Rocksdb Tuning Advisor\n\n## Motivation\n\nThe performance of Rocksdb is contingent on its tuning. However,\nbecause of the complexity of its underlying technology and a large number of\nconfigurable parameters, a good configuration is sometimes hard to obtain. The aim of\nthe python command-line tool, Rocksdb Advisor, is to automate the process of\nsuggesting improvements in the configuration based on advice from Rocksdb\nexperts.\n\n## Overview\n\nExperts share their wisdom as rules comprising of conditions and suggestions in the INI format (refer\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\nUsers provide the Rocksdb configuration that they want to improve upon (as the\nfamiliar Rocksdb OPTIONS file —\n[example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini))\nand the path of the file which contains Rocksdb logs and statistics.\nThe [Advisor](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser_example.py)\ncreates appropriate DataSource objects (for Rocksdb\n[logs](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_log_parser.py),\n[options](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_options_parser.py),\n[statistics](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_stats_fetcher.py) etc.)\nand provides them to the [Rules Engine](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser.py).\nThe Rules uses rules from experts to parse data-sources and trigger appropriate rules.\nThe Advisor's output gives information about which rules were triggered,\nwhy they were triggered and what each of them suggests. Each suggestion\nprovided by a triggered rule advises some action on a Rocksdb\nconfiguration option, for example, increase CFOptions.write_buffer_size,\nset bloom_bits to 2 etc.\n\n## Usage\n\n### Prerequisites\nThe tool needs the following to run:\n* python3\n\n### Running the tool\nAn example command to run the tool:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --rules_spec=advisor/rules.ini --rocksdb_options=test/input_files/OPTIONS-000005 --log_files_path_prefix=test/input_files/LOG-0 --stats_dump_period_sec=20\n```\n\n### Command-line arguments\n\nMost important amongst all the input that the Advisor needs, are the rules\nspec and starting Rocksdb configuration. The configuration is provided as the\nfamiliar Rocksdb Options file (refer [example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini)).\nThe Rules spec is written in the INI format (more details in\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\n\nIn brief, a Rule is made of conditions and is triggered when all its\nconstituent conditions are triggered. When triggered, a Rule suggests changes\n(increase/decrease/set to a suggested value) to certain Rocksdb options that\naim to improve Rocksdb performance. Every Condition has a 'source' i.e.\nthe data source that would be checked for triggering that condition.\nFor example, a log Condition (with 'source=LOG') is triggered if a particular\n'regex' is found in the Rocksdb LOG files. As of now the Rules Engine\nsupports 3 types of Conditions (and consequently data-sources):\nLOG, OPTIONS, TIME_SERIES. The TIME_SERIES data can be sourced from the\nRocksdb [statistics](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/statistics.h)\nor [perf context](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/perf_context.h).\n\nFor more information about the remaining command-line arguments, run:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --help\n```\n\n### Sample output\n\nHere, a Rocksdb log-based rule has been triggered:\n\n```shell\nRule: stall-too-many-memtables\nLogCondition: stall-too-many-memtables regex: Stopping writes because we have \\d+ immutable memtables \\(waiting for flush\\), max_write_buffer_number is set to \\d+\nSuggestion: inc-bg-flush option : DBOptions.max_background_flushes action : increase suggested_values : ['2']\nSuggestion: inc-write-buffer option : CFOptions.max_write_buffer_number action : increase\nscope: col_fam:\n{'default'}\n```\n\n## Running the tests\n\nTests for the code have been added to the\n[test/](https://github.com/facebook/rocksdb/tree/main/tools/advisor/test)\ndirectory. For example, to run the unit tests for db_log_parser.py:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m unittest -v test.test_db_log_parser\n```\n","CLAUDE.md":"# RocksDB Code Generation and Review Guidance\n\nThis document provides guidance for generating and reviewing code in the RocksDB project, derived from analysis of code review feedback across hundreds of complex merged Pull Requests. Use this as a reference when writing code with AI assistants or conducting code reviews.\n\n---\n\n## General Best Practices\n\n### Code Quality and Maintainability\n\n**Clarity and Readability:** Write clear, self-documenting code. Use meaningful variable names, add comments for complex logic, and structure code to minimize cognitive load. Avoid clever tricks that sacrifice readability for marginal performance gains unless absolutely necessary.\n\n**Consistent Style:** Follow existing code style conventions. RocksDB uses `.clang-format` for formatting, specific naming conventions, and structural patterns. Deviations from these patterns are frequently flagged in reviews.\n\n**Error Handling:** Ensure robust error handling throughout the codebase. Use RocksDB's `Status` type consistently, propagate errors appropriately, and avoid silently ignoring failures. Reviewers pay close attention to edge cases and failure modes.\n\n**Refactoring traps:** At least in production code, avoid constructs that could allow existing code to unexpectedly, quietly change meaning.\nSpecifically:\n* Avoid new defaulted parameters. This is the #1 trap on refactoring!\n* Avoid static_cast, reinterpret_cast, and C-style casts; static_cast_with_check, up_cast, and lossless_cast from cast_util.h are preferred.\n* Avoid declared type `auto` (`auto&`, `auto*` OK).\n\n### Testing Philosophy\n\n**Comprehensive Coverage:** Every change should include appropriate test coverage. This includes unit tests for isolated functionality, integration tests for component interactions, and stress tests for concurrency and performance validation. Reviewers will ask for additional tests if coverage is insufficient.\n\n**Edge Cases and Failure Modes:** Tests should explicitly cover edge cases, boundary conditions, and potential failure scenarios. This is especially important for changes affecting core database operations, compaction, or recovery logic.\n\n**Platform-Specific Testing:** RocksDB supports multiple platforms (Linux, Windows, macOS) and compilers (GCC, Clang, MSVC). Changes should be tested across relevant platforms, particularly when touching platform-specific code or using compiler-specific features.\n\n### Performance Considerations\n\n**⚠️ PERFORMANCE IS CRITICAL:** RocksDB is a high-performance storage engine where every CPU cycle and memory access matters. When writing code, always evaluate from a performance perspective. This is not optional—performance-aware coding is a fundamental requirement for all contributions.\n\n**Benchmarking and Profiling:** Performance claims should be backed by empirical evidence. Use RocksDB's benchmarking tools (e.g., `db_bench`) to validate improvements. Reviewers will request benchmark results for changes that could impact performance.\n\n**Memory Allocation:** Minimize dynamic memory allocations, especially in hot paths. Prefer stack allocation over heap allocation. Reuse buffers when possible. Consider using arena allocators or memory pools for frequent small allocations. Every `new`, `malloc`, or container resize has a cost.\n\n**Memory Copy:** Avoid unnecessary memory copies. Use move semantics, `std::string_view`, `Slice`, and pass-by-reference where appropriate. Be aware of implicit copies in STL containers and function returns. Prefer in-place operations over copy-and-modify patterns.\n\n**CPU Cache Efficiency:** Design data structures and access patterns to be cache-friendly. Keep frequently accessed data together (data locality). Prefer sequential memory access over random access. Be mindful of cache line sizes (CACHE_LINE_SIZE, typically 64 bytes) and avoid false sharing in concurrent code (see CacheAlignedWrapper). Especially when adding new data members, be mindful of ordering within structs and classes to reduce unnecessary padding (special care with bool members) and avoid larger-than-necessary types (e.g. prefer OptSlice to std::optional<Slice>).\n\n**Loop Optimization:** Look for opportunities to collapse nested loops, reduce loop overhead, and minimize branch mispredictions. Hoist invariant computations out of loops. Consider loop unrolling for tight inner loops. Batch operations when possible to amortize per-operation overhead.\n\n**SIMD and Vectorization:** Leverage SIMD instructions (SSE, AVX) for data-parallel operations when appropriate. Structure data to enable auto-vectorization by the compiler. Consider explicit SIMD intrinsics for critical hot paths like checksum computation, encoding/decoding, and bulk data processing.\n\n**Branch Prediction:** Minimize unpredictable branches in hot paths. Use `LIKELY`/`UNLIKELY` macros to hint branch prediction, e.g. for error cases and other rare or otherwise costly cases, but NOT for predicting popular configurations. Consider branchless alternatives for simple conditionals. Order switch cases and if-else chains by frequency.\n\n**Memory and Resource Management:** Be mindful of memory allocations, especially in hot paths. Use RAII patterns, smart pointers, and RocksDB's memory management utilities appropriately.\n\n**Hot Path Analysis:** When deciding how aggressively to optimize code, consider whether it's on a hot path:\n- **Hot path** (executed thousands+ times, e.g., data access, iteration, compaction loops): Performance is paramount. Apply all optimization techniques—loop collapsing, SIMD, cache optimization, pre-allocation, etc. The cost of each operation is multiplied by execution frequency.\n- **Cold path** (executed rarely, e.g., DB open, configuration parsing, error handling): Maintainability and clarity are more important. Prefer readable code over micro-optimizations. Complex optimizations here add maintenance burden with negligible performance benefit.\n- **Warm path** (moderate frequency): Balance both concerns. Use profiling data to guide optimization decisions.\n\n**Avoid Premature Optimization:** Performance is known critical in places like inner loops of compaction, read path and write path. Elsewhere, try to find a \"holy trinity\" solution of *correct, simple, and reasonably efficient*. More complex solutions are only appropriate when profiling/benchmarking data shows a measurable payoff.\n\n### API Design and Compatibility\n\n**Backwards Compatibility:** RocksDB maintains strong backwards compatibility guarantees. Breaking changes are rare and require extensive justification. When deprecating features, follow the project's deprecation policy (typically spanning multiple releases).\n\n**Behavioral Compatibility:** Behavior changes are human judgment calls that must be intentional, well-documented (including release notes), and well researched for potential downstream production impact. Agents and reviewers must call out potential gaps, ambiguity, or adverse impacts in intentionality, documentation, and production impact. For an existing accepted input—including an undocumented, discouraged, or historically ignored value—the analysis should compare old and new observable behavior, including performance and resource impact, identify known direct callers and stored configurations, and add or update regression coverage as appropriate.\n\n**API Consistency:** New APIs should be consistent with existing patterns. Use similar naming conventions, parameter ordering, and return types. Reviewers will suggest changes to improve consistency with the broader codebase.\n\n**Documentation:** Public APIs must be thoroughly documented, without unnecessary embelishment nor dwelling on implementation details nor project planning. When non-obvious, include usage examples, parameter descriptions, known bugs or limitations, notes on thread safety, performance characteristics, and compatibility considerations. Re-read comments for ambiguous terminology and phrasing, such as ambiguously re-purposed programming jargon.\n\n---\n\n## Component-Specific Guidance\n\n### Database Core (`db`)\n\nThe database core handles write-ahead logging (WAL), memtables, compaction, and recovery. This component receives the most scrutiny in code reviews.\n\n**Concurrency and Thread Safety:** Database operations are highly concurrent. Reviewers carefully examine locking strategies, atomic operations, and memory ordering. Document synchronization assumptions clearly. Use appropriate memory ordering semantics (`acquire`/`release` vs. `seq_cst`).\n\n**Compaction Logic:** Changes to compaction are complex and high-risk. Ensure that compaction logic respects configured parameters, handles edge cases (empty databases, single-file compactions), and maintains correctness under concurrent operations.\n\n**Error Propagation:** Database operations can fail in many ways (I/O errors, corruption, resource exhaustion). Ensure that errors are properly propagated, logged, and handled. Avoid assertions in production code paths.\n\n**Testing:** Database core changes require extensive testing, including unit tests, integration tests, and stress tests. Test with various configurations, compaction styles, and concurrent workloads.\n\n### Public Headers / \"Public API\" (`include/rocksdb/`)\n\nPublic headers define RocksDB's API surface. Changes here have the highest compatibility impact.\n\n**API Design:** New APIs should be intuitive, consistent with existing patterns, and well-documented. Consider how the API will be used in practice and avoid adding unnecessary complexity.\n\n**Backwards Compatibility:** Breaking changes to public APIs require extensive justification and a deprecation plan. Maintain ABI compatibility for bug fixes and patch releases.\n\n**Documentation:** Every public API must be thoroughly documented with usage examples, parameter descriptions, and notes on thread safety and performance characteristics.\n\n**Deprecation:** When deprecating APIs, follow the project's policy. Mark deprecated APIs clearly, provide migration guidance, and maintain support for at least one major release.\n\n### Internal Utilities (`util`)\n\nInternal utilities provide common functionality used throughout the codebase.\n\n**Code Reuse:** Utilities should be general-purpose and reusable. Avoid duplicating functionality that already exists elsewhere in the codebase.\n\n**Error Handling:** Utility functions should handle errors robustly and propagate them appropriately. Consider edge cases like overflow, underflow, and invalid inputs.\n\n**Testing:** Utility functions should have comprehensive test coverage, including edge cases and failure modes. Consider adding death tests for assertions.\n\n**Performance:** Utilities are often used in hot paths. Ensure that implementations are efficient and avoid unnecessary allocations or copies.\n\n### Table Management (`table`)\n\nTable management handles SST file format, block-based tables, and table readers/writers.\n\n**Block Format and Checksums:** Changes to block format require extreme care. Ensure that checksums are computed and verified correctly. Test with various compression algorithms and block sizes.\n\n**Iterator Correctness:** Table iterators are used throughout the codebase. Ensure that iterator semantics (Seek, Next, Prev) are correct, especially at boundaries and with deletions.\n\n**Caching and Prefetching:** Table readers interact with the block cache and prefetching logic. Ensure that cache keys are unique and that prefetching respects configured limits.\n\n**Performance:** Table operations are performance-critical. Benchmark changes that could impact read or write performance.\n\n### Utilities (`utilities`)\n\nUtilities include optional features like transactions, backup engine, and checkpoint.\n\n**Feature Isolation:** Utilities should be self-contained and not introduce unnecessary dependencies on core database internals.\n\n**Deprecation and Cleanup:** Legacy features are being phased out. When removing deprecated code, ensure that migration paths are documented and that users have sufficient warning.\n\n**Cross-Platform Compatibility:** Utilities often interact with OS-specific APIs. Ensure that code works on all supported platforms.\n\n### Options and Configuration (`options`)\n\nOptions define RocksDB's configuration system.\n\n**Type Safety:** Use appropriate types for options (e.g., `uint32_t` for flags, scoped enums for enumerated values).\n\n**Deprecation Policy:** When deprecating options, follow the project's policy. Document the deprecation, provide migration guidance, and maintain support for at least one major release.\n\n**Dynamic Configuration:** Some options can be changed dynamically. Ensure that dynamic changes are thread-safe and take effect correctly.\n\n**Validation:** Validate option values and provide clear error messages for invalid configurations.\n\n### Cache (`cache`)\n\nCache management is critical for RocksDB's performance.\n\n**Concurrency:** Cache operations are highly concurrent. Ensure that implementations are thread-safe and use appropriate synchronization primitives.\n\n**Performance:** Cache operations are in the hot path. Optimize for low latency and high throughput. Benchmark changes carefully.\n\n**Memory Management:** Cache implementations must manage memory carefully to avoid leaks and excessive allocations.\n\n**Eviction Policies:** Changes to eviction policies should be well-tested and benchmarked to ensure they improve overall performance.\n\n---\n\n## Code Review Checklist\n\nWhen reviewing RocksDB code (or preparing code for review), use this checklist:\n\n### Contract Boundaries\n- [ ] Is each behavior owned by the right layer? High-level policy (for example,\n  \"compaction wants this I/O mode\") should live at the caller/policy layer, while\n  lower layers should expose generic mechanisms (for example, \"open a fresh\n  reader\", \"skip shared cache insertion\", or \"use these FileOptions\").\n- [ ] Do comments and names describe local contracts rather than leaking a\n  specific caller's rationale into reusable APIs? Generic code should not need to\n  know about one current use case unless the API itself is intentionally\n  use-case-specific.\n- [ ] Does each flag or parameter control one coherent behavior? If one boolean\n  starts implying ownership, cache policy, I/O mode, prefetching, and caller\n  identity, split it into explicit flags or an options struct.\n- [ ] Could a future caller use this lower-level API without accidentally\n  inheriting assumptions from compaction, backup, user reads, or a particular\n  table format? If not, tighten the contract with assertions, clearer names, or\n  a narrower API.\n- [ ] Are implementation details not being used as policy signals? Prefer an\n  explicit contract over inferring behavior from incidental fields such as file\n  options, cache handles, or current table-reader state.\n\n### Correctness\n- [ ] Does the change preserve database semantics (e.g., snapshot isolation, key ordering)?\n- [ ] Are all error cases handled appropriately?\n- [ ] Is the change thread-safe? Are synchronization primitives used correctly?\n- [ ] Are there any potential data races or deadlocks?\n\n### Testing\n- [ ] Does the change include appropriate test coverage?\n- [ ] Are edge cases and failure modes tested?\n- [ ] Have the tests been run on all supported platforms?\n- [ ] Are stress tests passing?\n\n### Performance\n- [ ] Are there benchmark results for performance-sensitive changes?\n- [ ] Does the change avoid unnecessary allocations or copies?\n- [ ] Are hot paths optimized appropriately?\n\n### API and Compatibility\n- [ ] Is the change backwards compatible?\n- [ ] Are new APIs consistent with existing patterns?\n- [ ] Is the public API documented?\n- [ ] Are deprecated features handled according to policy?\n\n### Code Quality\n- [ ] Does the code follow RocksDB's style conventions?\n- [ ] Is the code clear and maintainable?\n- [ ] Are comments and documentation sufficient?\n- [ ] Are there any code smells or anti-patterns?\n\n---\n\n## Common Review Feedback Patterns\n\nThe following patterns emerged as frequent sources of review feedback:\n\n1. **Test Coverage:** Reviewers frequently request additional tests for edge cases, platform-specific behavior, and failure modes. Complex changes require comprehensive test coverage including unit tests, integration tests, and stress tests.\n\n2. **Error Handling:** Ensure proper error propagation using RocksDB's `Status` type. Avoid silent failures and provide clear error messages that include context about what failed and why.\n\n3. **API Design:** New APIs should be consistent with existing patterns. Use descriptive names that follow established conventions. Avoid breaking changes without strong justification and a clear deprecation plan.\n\n4. **Documentation:** Public APIs must be documented with usage examples and notes on thread safety, performance characteristics, and compatibility considerations. Complex internal logic should also be well-commented.\n\n5. **Performance:** Performance-sensitive changes require benchmark results to validate improvements. Use `db_bench` and other profiling tools to measure impact. Avoid premature optimization that adds complexity without measurable benefit.\n\n6. **Concurrency:** Thread safety is critical in RocksDB. Document synchronization assumptions clearly. Use appropriate memory ordering semantics. Consider potential race conditions and deadlocks.\n\n7. **Code Style:** Follow existing conventions for naming, formatting, and structure. Use `.clang-format` for consistent formatting. Prefer scoped enums (`enum class`) over unscoped enums.\n\n8. **Backwards Compatibility:** RocksDB maintains strong compatibility guarantees. Breaking changes require extensive justification. When deprecating features, provide migration guidance and maintain support across multiple releases.\n\n9. **Refactoring:** Reviewers appreciate refactoring that improves code readability and maintainability. Look for opportunities to deduplicate code and simplify complex logic.\n\n10. **Platform Compatibility:** Ensure changes work correctly on all supported platforms (Linux, Windows, macOS) and with all supported compilers (GCC, Clang, MSVC).\n\n11. **Contract Boundary Leaks:** When a change plumbs a new option or use-case\nspecific behavior through multiple subsystems, review the call chain for\ncontract leaks. Caller-specific rationale belongs at the call site or public API\ndocumentation; reusable layers should expose precise, layer-local capabilities.\nWatch especially for comments mentioning one caller in generic code, booleans\nthat silently bundle several behaviors, and downstream code inferring policy\nfrom an implementation detail instead of an explicit option.\n\n---\n\n## Important tips\n\n### Pull request and diff summaries\n* Before writing or updating an external RocksDB pull request summary or its\n  corresponding internal Phabricator diff summary, read and follow\n  `claude_md/pull_request_summary_guideline.md`.\n\n### Build system\n* There are 3 build system. Make for git clones, BUCK (meta internal) for hg\n  clones, and CMake for some special cases.\n* When a new .cc file is added, update Makefile, CMakeLists.txt, src.mk, BUCK.\n* Don't manually edit BUCK file, after updating src.mk, run\n    /usr/local/bin/python3 buckifier/buckify_rocksdb.py to update it\n* For -j in make command, use the number of CPU cores to decide it.\n* When searching for references to something (a symbol, library, etc.), do not\n  restrict or truncate your search based on presumed relevance or scope. It is\n  important and time-saving to keep the repo reasonably consistent across\n  different build systems, programming languages, and even between\n  documentation and implementation.\n\n### Avoiding mixed build modes with Make (use `AUTO_CLEAN=1`)\n\nObject files are written to the same paths regardless of build flags, so\nreusing objects from a prior build with different flags causes confusing\nlinker errors, etc. This problem is essentially avoidable by ALWAYS using\n`AUTO_CLEAN=1 make -j<n> <something>` for manual make invocations. This\nwill automatically clean object files if the build parameters/flavor have\nchanged. The `build_tools/rockstest.sh` / `rocksptest.sh` helpers described\nbelow set `AUTO_CLEAN=1` for you.\n\n`AUTO_CLEAN=1` does not fix Make failures associated with stale .d files\nreferring to removed files. Resolve that manually or with `make clean`\nwithout complaining to the user.\n\n### Source checks\n* Run `make check-sources` before committing. This catches non-ASCII\n    characters in source files and other source-level issues that CI will\n    reject. In particular, **do not use Unicode characters** (em dashes,\n    smart quotes, etc.) in comments or strings -- use ASCII equivalents\n    (`--` instead of em dash, `'` instead of smart quote, etc.).\n\n### License headers\n* Every new source file needs a license header. For a file that does **not**\n    carry an outside/third-party copyright, use the standard Meta dual-licensed\n    header (the dual-license designation is required -- a bare\n    \"All Rights Reserved\" copyright is not an acceptable open-source header):\n    ```\n    //  Copyright (c) Meta Platforms, Inc. and affiliates.\n    //  This source code is licensed under both the GPLv2 (found in the\n    //  COPYING file in the root directory) and Apache 2.0 License\n    //  (found in the LICENSE.Apache file in the root directory).\n    ```\n    Use a `#` comment prefix instead of `//` for shell, Python, and Makefile\n    fragments.\n* Files derived from an external source (e.g. LevelDB) keep their original\n    upstream copyright line in addition to the header above.\n\n### RTTI and dynamic_cast\n* Production code and `db_stress` must build in **release mode\n    (`-fno-rtti`)**. Do not use `dynamic_cast` anywhere except unit tests.\n    Use `static_cast_with_check` from `util/cast_util.h` (validates with\n    `dynamic_cast` in debug builds, plain `static_cast` in release).\n* Unit tests (`*_test.cc`) are built in debug mode with RTTI enabled.\n\n### Cross-platform / portability\nLocal `make` only exercises Linux with GCC/Clang, but CI\n(`.github/workflows/pr-jobs.yml` and `nightly.yml`) gates on a much wider\nmatrix, so portability breaks are invisible locally until CI fails. Code must\nbuild (and where noted, run tests) across:\n\n| Axis | Must support |\n|------|--------------|\n| OS | Linux (x86_64 + ARM), macOS, Windows |\n| Architecture | Little-endian and big-endian targets, including Linux on s390x |\n| Compiler | GCC, Clang (libstdc++ **and** libc++), AppleClang, **MSVC (VS2022)**, MinGW (Linux cross-compile, build-only, no gflags) |\n| Build system | Make, CMake, and BUCK (internal) -- keep all in sync (see \"Build system\" above) |\n| Config | release (`-fno-rtti`), `ASSERT_STATUS_CHECKED`, ASAN/UBSAN/TSAN, folly, unity build, JNI/Java |\n\nTreat these as constraints to satisfy and infer the specifics from them before\nadding any system header, libc call, or compiler-specific construct. The most\ncommon trap: anything that compiles under GCC/Clang on Linux but not under\n**MSVC/MinGW** -- e.g. unguarded POSIX-only headers/functions (`<unistd.h>`,\n`<sys/*.h>`, `getpid`, `_exit`, ...) or GCC/Clang extensions\n(`__attribute__`, `__builtin_*`, VLAs, `alloca`). Prefer the `port::`/`Env`\nabstractions; otherwise guard with `#ifdef OS_WIN` (POSIX `<unistd.h>` ->\nWindows `<process.h>`). Because libc++ is also tested, include what you use\nrather than relying on libstdc++ transitive includes.\n\nDo not use `static_assert` to reject a supported architecture for an optional\nfeature. Check an existing `port::` capability such as `port::kLittleEndian`\nand disable only the unsupported feature so the rest of RocksDB still builds.\nUse a portable representation when the feature itself must work across\narchitectures.\n\n### Unit Test\n* After all of the unit tests are added, review them and try to extract common\n    reusable utility functions to reduce code duplication due to copy past between\n    unit tests. This should be done every time unit test is updated.\n* Don't use sleep to wait for certain events to happen. This will cause test to\n    be flaky. Instead, use sync point to synchronize thread progress.\n* Cap unit test execution with 60 seconds timeout.\n* To build and run unit tests locally, prefer these helper scripts:\n    * `build_tools/rocksptest.sh <test_binary> [more_binaries...] [args...]`\n        builds the binary(ies) with parallel make and `AUTO_CLEAN=1` and runs\n        them under gtest-parallel, sharding the test cases across CPUs. Prefer\n        this whenever running more than a couple of test cases, e.g.\n        `build_tools/rocksptest.sh table_test` or\n        `build_tools/rocksptest.sh db_test env_test --gtest_filter=*Foo*`.\n    * `build_tools/rockstest.sh <test_binary> [args...]` builds with parallel\n        make and `AUTO_CLEAN=1` and runs the binary directly (serially).\n        Use it only for a very small number of test cases, e.g.\n        `build_tools/rockstest.sh db_test --gtest_filter=*MixedSlowdown*`.\n* After writing a test, stress-test for flakiness (AUTO_CLEAN handles the\n    rebuild needed by the `COERCE_CONTEXT_SWITCH=1` flag change):\n    ```bash\n    COERCE_CONTEXT_SWITCH=1 build_tools/rockstest.sh {test_binary} -r100 \\\n        --gtest_filter=\"*YourTestName*\"\n    ```\n* For CI-style flaky tests that do not reproduce with `gtest_parallel.py`,\n    `--gtest_repeat`, or normal coerce-mode runs, inspect\n    `tools/gtest_parallel_repro.py --help`.\n* Each unit test file has overheads, so avoid creating new unit test files\n  for random minor features. Consider adding to slice_test, db_etc3_test, or\n  others.\n\n### Unit test dedup guidelines\n* Extract helper functions for repeated patterns such as object\n    construction, round-trip (encode → decode → verify), and common\n    assertion sequences.\n* Use table-driven tests (struct array + loop) when multiple test cases\n    share the same logic but differ only in input/expected data.\n* Prefer randomized tests over exhaustive parameter permutations. Use\n    `Random` from `util/random.h` (not `std::mt19937`). Use a time-based\n    seed with `SCOPED_TRACE(\"seed=\" + std::to_string(seed))` so failures\n    are reproducible.\n* Keep deterministic edge-case tests separate from randomized tests\n    (error paths, boundary conditions, format verification).\n* Methods only used in tests should be private with `friend class` +\n    `TEST_F` fixture wrappers. In wrappers, always fully qualify the\n    target method to avoid infinite recursion.\n\n### Adding new public API\n    Refer to claude_md/add_public_api.md\n\n### Changing existing public API behavior\n    Follow the Behavioral Compatibility requirements above.\n\n### Adding new option\n    Refer to claude_md/add_option.md\n\n### Removing deprecated option\n    Refer to claude_md/remove_option.md\n\n### Metrics\n* When adding a new feature, evaluate whether there is opportunity to add\n    metrics. Try to avoid causing performance regression on hot path when adding\n    metrics.\n\n### Stress test\n* When adding a new feature, make sure stress test covers the new option.\n\n### Component docs\n* For component-level design notes and implementation walkthroughs, start with\n    `docs/components/index.md`.\n* Documentation under `docs/components/` is organized by subsystem in\n    `docs/components/<area>/`.\n* Each subsystem directory should have an `index.md` entry point plus focused\n    chapter files for deeper topics.\n\n### DB bench update\n* When adding a performance related feature, support it in db_bench\n\n### Adding release note\n* Release note should be kept short at high level for external user consumption.\n    Release notes identify what users might care about most in a release. They\n    are not exhaustive and are not a guide. PLEASE learn from past agents who\n    tried to build elaborate release notes with implementation details and\n    elsewhere-documented nuance. That wastes time. Fight the bias that\n    \"my change\" is important so must be worthy of release note mention.\n* If more than single markdown line, consider how their formatting will be\n    integrated into HISTORY.md.\n\n### Blog posts (docs/_posts)\n* Blog post authors must be defined in `docs/_data/authors.yml` to be displayed\n\n### Final verification of the change\n* Execute `AUTO_CLEAN=1 make check` to build all of the changes and execute all\n    of the tests. `AUTO_CLEAN=1` ensures a clean rebuild if your previous build\n    used different parameters. Note that executing all of the tests could take\n    multiple minutes.\n* Run `AUTO_CLEAN=1 ASSERT_STATUS_CHECKED=1 make check` to verify all Status\n    objects are properly checked. This catches missing error handling that can\n    lead to silent data corruption. Merely building with ASSERT_STATUS_CHECKED=1\n    accomplishes nothing; it enables a runtime check. New unit tests missing\n    Status checks is a common failure point, even from agents.\n\n### Monitoring make check progress\n* Use `make check-progress` to get machine-parseable JSON progress while\n    `make check` is running. This is useful for Claude Code to monitor long\n    builds without timeout issues.\n* Run `make check` in background, then poll progress:\n    ```bash\n    AUTO_CLEAN=1 make check &\n    # Poll periodically:\n    make check-progress\n    ```\n* The output shows current phase and progress:\n    ```json\n    {\"status\":\"running\",\"phase\":\"compiling\",\"completed\":300,\"total\":919,...}\n    {\"status\":\"running\",\"phase\":\"testing\",\"completed\":1500,\"total\":29962,\"failed\":0,\"percent\":5,...}\n    {\"status\":\"completed\",\"phase\":\"testing\",\"completed\":29962,\"total\":29962,\"failed\":0,\"percent\":100,...}\n    ```\n* Phases: `compiling` -> `linking` -> `generating` -> `testing` -> `completed`\n* Key fields: `status`, `phase`, `completed`, `total`, `failed`, `percent`\n* When tests fail, `failed_tests` array shows details (up to 10 failures):\n    ```json\n    {\"status\":\"running\",...,\"failed\":3,\"failed_tests\":[\n      {\"test\":\"cache_test-CacheTest.Usage\",\"exit_code\":1,\"signal\":0,\"output\":\"...test log...\"},\n      {\"test\":\"env_test-EnvTest.Open\",\"exit_code\":0,\"signal\":11,\"output\":\"...Segmentation fault...\"}\n    ]}\n    ```\n* `exit_code`: non-zero means test assertion failed\n* `signal`: non-zero means test was killed (e.g., 9=SIGKILL, 6=SIGABRT, 11=SIGSEGV)\n* `output`: last 50 lines of test log including error messages and stack traces\n\n### Executing benchmark using db_bench\n* Since the goal is to measure performance, we need to build a release binary\n    using `AUTO_CLEAN=1 DEBUG_LEVEL=0 make db_bench`. If there is an engine\n    crash due to a bug, switch back to a debug build with\n    `AUTO_CLEAN=1 make dbg`; `AUTO_CLEAN=1` handles the release<->debug rebuild\n    automatically.\n\n### Formatting code\n* After making change, use `make format-auto` to auto-apply formatting without\n    interactive prompts (Claude Code friendly).\n","tools/cpu_corruption_injector/README.md":"# CPU Corruption Injector\n\n## Overview\n\nThis tool measures the **outcome distribution** over many `db_stress` test runs.\nIn each `db_stress` test run, a single CPU-register bit-flip is injected into\nexactly one `db_stress` operation (a write, flush, or compaction) running under\n`gdb`. Aggregating over many such runs answers \"when the CPU corrupts one\ninstruction inside that op, how often does RocksDB catch it, crash, silently\nlose/return wrong data, or absorb it with no effect?\".\n\nIt has three layers:\n\n- **Detection** (`db_stress --verify_cpu_corruption_dir`): right after the\n  injected op, `db_stress` reads the whole keyspace back and compares against its\n  expected state, writing any finding to a `data_corruption.*.json` file.\n- **Injection** (`injector*.py`): runs inside `gdb`, navigates to a randomly\n  chosen instance of the op, stops at a random \"critical\" instruction -- one of\n  the two kinds that can carry a fault into data: a **move** carrying a value\n  between CPU and memory (a general-purpose or vector register), or a\n  **branch/jump** (the `eflags` register) -- and flips one random bit in the\n  register it uses. Control registers (`rsp`/`rbp`/`rip`/segment) are left alone.\n- **Orchestration** (`runner*.py`): builds the run set, launches `gdb` per run,\n  classifies each outcome, and aggregates them.\n\n## Requirements\n\n- A `db_stress` binary built with debug info and no inlining, so `gdb` can set\n  breakpoints on the injection-site functions and read their source lines:\n\n  ```bash\n  make DEBUG_LEVEL=0 EXTRA_CXXFLAGS=\"-g -fno-inline\" db_stress\n  ```\n\n- `gdb`. Defaults to `/usr/bin/gdb`; override with the `ICC_GDB` env var if the\n  telemetry's source resolves to `@ ?:0` (a `gdb` too old to read this build's\n  debug info).\n- Optional per-run timeout via the `ICC_RUN_TIMEOUT` env var (seconds, default\n  `600`). One hung `gdb`+`db_stress` cannot block the rest of the set.\n\n## Entry point: `runner.py`\n\nA **campaign** is many `db_stress` test **runs** of one op type. Each run is a\nfull single-threaded `db_stress` test that performs `ops_per_thread` ops, but the\ninjector corrupts exactly **one** op instance of the chosen type in that run\n(e.g. the 51st Put of that run); the run is then classified into a single outcome\nbucket.\n\n- `--op` is one of `write`, `flush`, `compaction`.\n- `--parallel N` runs `N` runs at once (each `db_stress` run is itself\n  single-threaded, so raise this to use more cores).\n- `--seed N` sets the campaign's `base_seed`: run `i` deterministically uses seed\n  `N+i`, which drives both the injection choices and `db_stress`'s own `--seed`, so\n  the whole set is reproducible from `base_seed` alone. Omit `--seed` to draw one\n  fresh random `base_seed` per campaign (chosen once per `runner.py` run and logged as `base_seed=N`); pass that `N` back via `--seed`\n  to replay the set, or `--seed=<N+i>` with `--runs 1` to replay just run `i`.\n\nIn the examples below, `<db_stress>` is the path to the `db_stress` binary you\nbuilt (see [Requirements](#requirements) above -- e.g. `./db_stress`), and\n`<dir>` is a writable directory for the campaign's output.\n\n```bash\n# a compaction campaign of 100 runs\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir>\n\n# a flush campaign of 200 runs, 8 in parallel\npython3 tools/cpu_corruption_injector/runner.py --op flush --runs 200 \\\n    --stress_cmd <db_stress> --report_dir <dir> --parallel 8\n\n# replay an earlier campaign: pass its logged base_seed back as --seed\n# (the runner prints \"reproduce with --seed=<base_seed>\"); base_seed is in [1, 4294967295]\npython3 tools/cpu_corruption_injector/runner.py --op write --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir> --seed 3141592653\n```\n\nBefore doing any work, `runner.py` preflights the build: it confirms `gdb` can\nset breakpoints on the op's injection-site functions and read their source\nlines, and fails fast otherwise.\n\n## Outputs\n\nEverything lands under `--report_dir`: two campaign-wide files at the top level,\nplus one `run_XXXXX/` subdirectory per run.\n\n```text\n<report_dir>/\n├── summary.json          # campaign-wide: outcome_counts + a record per run\n├── runner.log            # campaign-wide: runner logging (also echoed to console)\n├── run_00000/            # one subdirectory per run\n│   ├── inject.json                 # what the injector did (WHERE / WHAT / HOW)\n│   ├── data_corruption.<tid>.json  # the finding, only if this run flagged an SDC/corruption\n│   ├── gdb.log                     # this run's gdb output\n│   ├── db/                         # this run's db_stress DB (working dir)\n│   └── exp/                        # this run's expected-values (working dir)\n├── run_00001/\n│   └── ...\n└── ...\n```\n\nSo `summary.json` and `runner.log` are at the top of `--report_dir`; the\nper-run `gdb.log` / `inject.json` / `data_corruption.*.json` live inside each\n`run_XXXXX/`.\n\nOutcome buckets:\n\n- **SDC**: silent data corruption -- the read-back succeeded but returned the\n  wrong result (a lost key, a resurrected key, or a wrong value).\n- **CORRUPTION**: `db_stress` detected a corruption via an integrity check\n  (`Status::Corruption`).\n- **CRASH**: the injected corruption crashed `db_stress` (a fatal signal).\n- **NO_EFFECT**: the corruption landed but the run finished with correct data.\n- **NO_INJECTION**: no bit was flipped this run. The op instance, its\n  `target_fn`, and the instruction to corrupt are all picked **randomly** up\n  front, so a run can occasionally target something it never reaches -- a random\n  op instance beyond the ops this run actually performed, or a\n  critical-instruction index that no later `target_fn` call happens to have.\n  Should be rare; a high count means the injection sites (or the random ranges)\n  need revisiting.\n- **ERROR**: a harness/framework failure, **not** a `db_stress` data outcome --\n  the injector hit a bug, `gdb` died before writing `inject.json`, or the run hit\n  the `ICC_RUN_TIMEOUT` cap. Expected to be **0**; any non-zero count is a\n  framework bug worth investigating.\n\n## Reading a run's output across the 3 layers\n\nEach run threads through all three layers: the injector records what it corrupted\n(`inject.json`), `db_stress` records what the post-op read-back found\n(`data_corruption.<tid>.json`), and the runner rolls every run up into\n`summary.json`. The examples below are from a real 40-run compaction campaign:\n\n```bash\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 40 \\\n    --seed 424242 --stress_cmd <db_stress> --report_dir <dir>\n```\n\n**Orchestration layer** -- `summary.json`'s `outcome_counts` (how many of the\ncampaign's runs landed in each bucket), the whole campaign at a glance:\n\n| SDC | CORRUPTION | CRASH | NO_EFFECT | NO_INJECTION | ERROR |\n| --- | ---------- | ----- | --------- | ------------ | ----- |\n|   2 |         10 |     0 |        25 |            3 |     0 |\n\n### A silent data corruption (SDC): `run_00023`\n\n**Injection layer** -- `run_00023/inject.json`: an `eflags` flag-flip on the\ncompaction iterator's key-copy path; the op did NOT crash\n(`db_stress_crash_signal: null`):\n\n```json\n{\n  \"injection_result\": \"injected\",\n  \"db_stress_crash_signal\": null,\n  \"op\": \"compaction\",\n  \"op_index\": 6,\n  \"entry_fn\": \"rocksdb::CompactionJob::Run\",\n  \"target_fn\": \"rocksdb::CompactionIterator::NextFromInput\",\n  \"critical_instruction_index\": 0,\n  \"corruptions\": [\n    {\n      \"instruction\": \"cmp    $0x40,%rdx\",\n      \"register\": \"eflags\",\n      \"corruption_type\": \"flag_flip\",\n      \"before\": \"0x287\",\n      \"after\": \"0x286\",\n      \"details\": {\n        \"source\": \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n        \"call_chain\": [\n          \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n          \"rocksdb::IterKey::SetKeyImpl @ ./db/dbformat.h:941\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:741\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:749\",\n          \"rocksdb::CompactionIterator::NextFromInput @ db/compaction/compaction_iterator.cc:781\"\n        ]\n      }\n    }\n  ],\n  \"ops_seen\": 6,\n  \"critical_instructions_seen\": 1\n}\n```\n\n**Detection layer** -- `run_00023/data_corruption.<tid>.json`: the post-op\nread-back found a committed key missing:\n\n```json\n{\n  \"kind\": \"lost\",\n  \"cf\": 0,\n  \"key\": 202,\n  \"value_from_db\": \"\",\n  \"value_from_expected\": \"010000000504070609080B0A0D0C0F0E\",\n  \"op_status\": \"Get: NotFound\"\n}\n```\n\nReading it: the flag flip mis-copied the compaction output key, dropping key 202\nfrom the output SST. The op returned OK and no checksum fired, but reading key\n202 back returns `NotFound` for a committed key, so the runner classifies the run\n`SDC` (`kind=lost`) -- the bug class this tool exists to surface.\n\n## Auxiliary entry point: `injector.py`\n\n`injector.py` is **not run on its own** -- there is no `python3 injector.py`\nusage. It only works inside `gdb`'s embedded Python (it does `import gdb`), so\n`runner.py` runs it by launching `gdb` with the injector as gdb's script. Each\nrun's invocation looks like:\n\n```bash\ngdb --batch --nx \\\n    -iex 'py import sys; sys.argv=[...]' \\\n    -x tools/cpu_corruption_injector/injector.py \\\n    --args <db_stress> <db_stress flags...>\n```\n\n- `--batch` runs `gdb` non-interactively and exits when the script finishes;\n  `--nx` skips the user's `~/.gdbinit` so their config can't change behavior.\n- `-iex 'py ... sys.argv=[...]'` runs a Python command *before* the script loads,\n  seeding `injector.py`'s `sys.argv` with its parameters (`--op`, `--op_index`,\n  `--entry_fn`, `--target_fn`, `--seed`, `--dir`) -- gdb otherwise hands a `-x`\n  script an empty argv.\n- `-x tools/cpu_corruption_injector/injector.py` is the script `gdb` executes in\n  its embedded Python.\n- `--args <db_stress> <db_stress flags...>` is the program `gdb` launches and\n  debugs -- the `db_stress` binary and its flags, which `gdb` starts, stops\n  mid-op, and corrupts.\n","tools/c_api_gen/README.md":"# RocksDB C API Code Generation Prototype\n\nThis directory contains a **prototype** for semi-automating parts of\nRocksDB's C API based on the existing C++ public API and the current C API\nconventions in `include/rocksdb/c.h` / `db/c.cc`.\n\nThe intent is **not** to automatically wrap arbitrary C++ APIs. Instead, the\ngoal is to reduce maintenance burden for the parts of the C API that are\nalready highly mechanical today.\n\n## Why a semi-automated approach\n\nRocksDB's C API follows stable conventions that downstream users rely on:\n\n- opaque handle types like `rocksdb_t*`, `rocksdb_transaction_t*`\n- `Status` translated to `char** errptr`\n- `Slice` translated to `const char*` + `size_t`\n- binary/string results copied into `malloc()`-owned buffers\n- booleans represented as `unsigned char`\n- `rocksdb_<object>_<verb>[_cf][_with_ts]` naming\n\nThese conventions are valuable and should remain the source of truth for the\ngenerated code.\n\nAt the same time, the C++ public API includes features that are poor fits for\nfully automatic wrapper generation:\n\n- callback-backed polymorphic types (`Comparator`, `MergeOperator`, etc.)\n- complex object construction/open flows\n- ownership-transferring factory setters\n- vector-heavy marshalling APIs like the `MultiGet` family\n- virtual extension points and custom bridging logic\n\nFor those cases, hand-designed wrappers remain the right tool.\n\n## Why the spec-driven generator still exists\n\nThe spec-driven generator is still needed for wrappers whose C shape cannot be\nreliably inferred from the C++ declaration alone.\n\nYes, this means `spec.json` is manually maintained. That is intentional. The\ngoal is not to eliminate human decisions; the goal is to stop hand-writing the\nsame declaration/definition boilerplate once those decisions have been made.\n\nFor many wrappers, someone still has to decide:\n\n- the C function name and parameter order\n- whether a C++ `Status` becomes `char** errptr`\n- whether default C++ objects should be synthesized, such as `ReadOptions()`\n- how ownership and lifetime should work for pointers, factories, and callbacks\n- how vectors, maps, and option collections should be flattened into C\n- whether the C API should intentionally differ from the C++ API shape\n\nThose are API design choices, not mechanical translations. The spec-driven\npath keeps those choices explicit while still generating consistent boilerplate.\n\nBackward compatibility with the existing hand-written C API is one input, but\nit is not the primary reason this layer exists. Even for brand-new wrappers, we\nstill need an explicit policy layer for non-trivial C bindings.\n\n## What this prototype focuses on\n\nThe generator currently targets representative examples from the easiest and\nmost repetitive wrapper families:\n\n1. **Simple scalar field setters/getters**\n   - `rocksdb_options_set_create_if_missing`\n   - `rocksdb_options_get_create_if_missing`\n   - `rocksdb_readoptions_set_fill_cache`\n   - `rocksdb_writeoptions_set_sync`\n   - `rocksdb_block_based_options_set_block_size`\n   - `rocksdb_cuckoo_options_set_hash_ratio`\n\n2. **Simple forwarding wrappers with no `Status`**\n   - `rocksdb_writebatch_clear`\n   - `rocksdb_writebatch_put`\n   - `rocksdb_writebatch_put_cf`\n   - `rocksdb_writebatch_delete`\n   - `rocksdb_writebatch_put_log_data`\n   - `rocksdb_writebatch_set_save_point`\n   - `rocksdb_transaction_set_savepoint`\n\n3. **Simple forwarding wrappers with `Status` -> `char** errptr`**\n   - `rocksdb_put`, `rocksdb_put_cf`\n   - `rocksdb_delete`, `rocksdb_delete_cf`\n   - `rocksdb_merge`, `rocksdb_merge_cf`\n   - `rocksdb_write`\n   - `rocksdb_writebatch_rollback_to_save_point`\n   - `rocksdb_writebatch_pop_save_point`\n   - `rocksdb_transaction_put`, `rocksdb_transaction_put_cf`\n   - `rocksdb_transaction_merge`, `rocksdb_transaction_merge_cf`\n   - `rocksdb_transaction_delete`, `rocksdb_transaction_delete_cf`\n   - `rocksdb_transaction_commit`\n   - `rocksdb_transaction_rollback`\n   - `rocksdb_transaction_rollback_to_savepoint`\n\n4. **Simple metadata accessors**\n   - `rocksdb_flushjobinfo_cf_name`\n   - `rocksdb_flushjobinfo_largest_seqno`\n\nThis is intentionally a constrained subset. The point is to demonstrate a\nmaintainable pattern and a spec format that can be extended gradually.\n\n## What should remain manual\n\nThese families should stay hand-written unless a future design adds a much\nricher generator:\n\n- comparators / merge operators / compaction filters / event listeners\n- compaction service wrappers\n- openers and constructors that build vectors/maps of descriptors/options\n- `MultiGet` / batched `MultiGet` families\n- wrappers involving `std::shared_ptr` / `std::unique_ptr` ownership transfer\n- C APIs whose behavior intentionally differs from the C++ API shape\n\n## Design principles\n\n### 1. Keep the current C API conventions\n\nThe code generator should not invent a new style. It should emit code that\nlooks like today's hand-written wrappers:\n\n- `SaveError(errptr, ...)`\n- `Slice(key, keylen)`\n- direct field assignments for plain option setters\n- same function names and signatures\n\n### 2. Let auto-discovery handle the simple direct cases\n\nFor a small set of mechanically mappable public structs, the generator can\ndiscover missing bindings directly from the C++ headers and emit the missing C\nwrappers automatically. Existing handwritten wrappers still win when they\nalready exist.\n\nToday this strict auto-discovery path is used for:\n\n- simple `ReadOptions` scalar / enum fields\n- simple scalar / enum fields across selected public option structs\n- simple metadata fields on listener/job-info structs\n- simple metadata view structs such as table-properties and compaction metadata\n\nFor those managed families, unsupported or intentionally deferred fields must\nbe explicitly recorded in `auto_simple_bindings_blocklist.json` rather than\nbeing skipped silently. Anything outside those families remains hand-written.\n\n### 3. Keep explicit spec for non-trivial wrappers\n\nThe spec-driven generator remains the right tool for method-style wrappers and\nother APIs whose C surface requires an explicit design decision. In practice:\n\n- auto-discovery owns simple direct field coverage for selected struct families\n- `spec.json` owns wrappers that are still manual in design but repetitive in\n  implementation\n- fully irregular ownership-heavy or callback-heavy APIs remain hand-written\n\n### 4. Let C++ headers guide validation, not policy\n\nLonger term, Clang/libTooling can help validate that a wrapper spec still\nmatches the underlying C++ method signature. But the C naming, ownership, and\nerror-handling policy should remain explicit in the spec.\n\n## Files\n\nSource templates (hand-written; NOT user-includable and NOT compiled directly):\n\n- `c_base.h`\n  - hand-written template for `include/rocksdb/c.h`; the generated `.h.inc`\n    fragments are inlined into it to produce the self-contained public header\n- `c_base.cc`\n  - hand-written template for `db/c.cc`; the generated `.cc.inc` fragments are\n    inlined into it to produce the compiled implementation\n\nGenerators and inputs:\n\n- `spec.json`\n  - declarative input for the spec-driven generator\n- `generate_c_api.py`\n  - emits header/source fragments from the spec\n- `auto_simple_bindings.py`\n  - auto-discovers simple public field bindings and generates checked-in\n    `.inc` files for them\n- `auto_simple_bindings_blocklist.json`\n  - checked-in exceptions for auto-managed fields that are intentionally manual\n    or temporarily deferred\n- `abi_type_overrides.json`\n  - per-function C type pins so already-shipped wrappers keep their historical\n    C signature even when the C++ field type maps to a different C type\n- `regen_all.py`\n  - orchestrates both generators and inlines the fragments into `c.h` / `c.cc`\n\nVerification (run by `make check-c-api-gen` and in CI):\n\n- `check_api_completeness.py`\n  - asserts every declared public C function has exactly one definition\n    (dependency-free; guards against link-time breakage of bindings)\n- `check_api_compatibility.py` + `api_compatibility_allowlist.json`\n  - signature-level backward-compatibility gate against a reference revision;\n    the authoritative ABI/API-stability check\n- `verify_generated_up_to_date.py`\n  - regenerates in a temp dir and confirms the checked-in output is current\n- `validate_generated_equivalence.py` + `equivalence_allowlist.json`\n  - best-effort migration aid: compares generated wrapper *bodies* against a\n    PRE-migration hand-written revision. Body comparison is heuristic; for\n    backward-compatibility rely on `check_api_compatibility.py`.\n\n## Toolchain requirements\n\nRegeneration needs two external tools:\n\n- **`clang++`** (libclang) — used to dump the C++ struct ASTs that drive\n  auto-discovery. Resolution order is `$CXX` (if it names a clang), then bare\n  `clang++`, then versioned fallbacks (`clang++-21` … `clang++-13`).\n- **`clang-format`** — used to canonicalize the generated `.inc` fragments (and\n  therefore the inlined `c.h` / `c.cc`).\n\nThe checked-in generated output is byte-reproducible only for a **pinned\nclang-format version**. CI uses **clang-format-21** (see\n`.github/workflows/pr-jobs.yml`); pin the same version locally so your\nregeneration matches CI:\n\n```bash\npython3 tools/c_api_gen/regen_all.py --clang-format clang-format-21\n# or, when running the staleness check via make:\nmake check-c-api-gen CLANG_FORMAT_BINARY=clang-format-21\n```\n\nIf `clang++` is not installed, `make check` skips the C API staleness check\nwith a message instead of failing, so it still works without the codegen\ntoolchain. CI is the authoritative gate.\n\nThe dedicated `build-linux-clang-21-no_test_run` CI job runs this target with\n`CHECK_C_API_GEN_STRICT=1`, which turns every such \"skip\" (missing `clang++` or\nclang-format, or an unresolvable compat baseline ref) into a hard error, so the\ncore CI coverage cannot silently regress to a no-op:\n\n```bash\nmake check-c-api-gen CHECK_C_API_GEN_STRICT=1 CLANG_FORMAT_BINARY=clang-format-21\n```\n\n## Running the generators\n\nFrom the repo root, to regenerate all checked-in fragments and the inlined\n`c.h` / `c.cc`:\n\n```bash\npython3 tools/c_api_gen/regen_all.py\n```\n\nThis regenerates:\n\n- the spec-driven fragments from `spec.json`\n- the auto-discovered fragments produced by `auto_simple_bindings.py`\n- the round-trip tests produced by `gen_roundtrip_tests.py`\n\nTo preview only the spec-driven output for one section without touching the\nchecked-in fragments, run `generate_c_api.py` directly with `--header-out` /\n`--source-out` pointing at a scratch path (e.g. under `/tmp`).\n\nTo verify the auto-discovered checked-in output is up to date:\n\n```bash\npython3 tools/c_api_gen/auto_simple_bindings.py --check\n```\n\nTo verify the full checked-in generated set is stable without relying on Git\nworktree metadata:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\n## Maintaining Auto-Managed Families\n\nWhen a new public field is added to an auto-managed family, use this decision\nprocess:\n\n1. If it is a simple scalar, enum, string, or supported chrono field and the\n   desired C API shape matches the existing conventions, do not hand-edit\n   `include/rocksdb/c.h` or `db/c.cc`. Run `python3 tools/c_api_gen/regen_all.py`\n   and let `auto_simple_bindings.py` generate the wrapper.\n2. If the field needs an explicit C API design because of ownership, callbacks,\n   vectors, maps, nested structs, or intentionally different C naming/behavior,\n   keep it out of auto-generation by adding an entry to\n   `tools/c_api_gen/auto_simple_bindings_blocklist.json` with\n   `\"policy\": \"manual\"`.\n3. If the field belongs to an auto-managed family but you intentionally want to\n   postpone C API coverage for a short time, add a blocklist entry with\n   `\"policy\": \"deferred\"` and a concrete reason. Include `tracking_issue` when\n   you have one.\n4. If none of the above applies, the build should fail. Extend\n   `auto_simple_bindings.py`, add a spec-driven wrapper, or add a hand-written\n   wrapper and then update the blocklist policy accordingly.\n\nThe blocklist is intentionally strict:\n\n- each entry must identify the managed family and field\n- each entry must have a non-empty reason\n- policy must be either `manual` or `deferred`\n- stale entries fail regeneration if the field disappears or is renamed\n\nExample deferred entry:\n\n```json\n{\n  \"name\": \"ReadOptions\",\n  \"entries\": [\n    {\n      \"field\": \"future_slice_option\",\n      \"policy\": \"deferred\",\n      \"reason\": \"Needs an explicit C buffer ownership design before exposing it.\",\n      \"tracking_issue\": \"T123456789\"\n    }\n  ]\n}\n```\n\nThe blocklist only applies to the auto-managed families handled by\n`auto_simple_bindings.py`. It is not a substitute for `spec.json`, which still\nowns non-trivial method-style wrappers. It is also unrelated to\n`equivalence_allowlist.json`, which only suppresses intentional diff mismatches\nin the equivalence checker.\n\nTo refresh the full checked-in generated set and confirm nothing changes:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\nTo verify active generated wrappers are equivalent to the handwritten wrappers\nfrom a reference revision:\n\n```bash\npython3 tools/c_api_gen/validate_generated_equivalence.py --ref HEAD\n```\n\nThis checks the generated fragments currently included by\n`include/rocksdb/c.h` and `db/c.cc` against `HEAD:include/rocksdb/c.h` and\n`HEAD:db/c.cc`. Known historical inconsistencies can be documented in\n`equivalence_allowlist.json` with a reason instead of being silently ignored.\n\n## Suggested migration path\n\n1. Start with generated preview fragments only.\n2. Migrate a few low-risk existing wrappers to generated sections.\n3. Keep manual and generated sections clearly separated.\n4. Let auto-discovery pick up new simple public fields automatically.\n5. Extend the spec or keep manual wrappers for complex/manual families.\n\nThis incremental approach minimizes downstream impact while still reducing\nmaintenance burden over time.\n","tools/c_api_gen/spec.json":"{\n  \"sections\": [\n    {\n      \"name\": \"DB data operations\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge_cf\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_range_cf\",\n          \"call_expr\": \"db->rep->DeleteRange\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"start_key\",\n              \"len_name\": \"start_key_len\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"end_key\",\n              \"len_name\": \"end_key_len\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(start_key, start_key_len)\",\n            \"Slice(end_key, end_key_len)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_cf\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_wal\",\n          \"call_expr\": \"db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_pause_background_work\",\n          \"call_expr\": \"db->rep->PauseBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_continue_background_work\",\n          \"call_expr\": \"db->rep->ContinueBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_disable_file_deletions\",\n          \"call_expr\": \"db->rep->DisableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_enable_file_deletions\",\n          \"call_expr\": \"db->rep->EnableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_checksum\",\n          \"call_expr\": \"db->rep->VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_file_checksums\",\n          \"call_expr\": \"db->rep->VerifyFileChecksums\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": [\n            \"ReadOptions()\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_destroy_db\",\n          \"call_expr\": \"DestroyDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_repair_db\",\n          \"call_expr\": \"RepairDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"WriteBatch\",\n      \"functions\": [\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_clear\",\n          \"call_expr\": \"b->rep.Clear\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_cf\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_delete\",\n          \"call_expr\": \"b->rep.Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_log_data\",\n          \"call_expr\": \"b->rep.PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_set_save_point\",\n          \"call_expr\": \"b->rep.SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_rollback_to_save_point\",\n          \"call_expr\": \"b->rep.RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_pop_save_point\",\n          \"call_expr\": \"b->rep.PopSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_verify_checksum\",\n          \"call_expr\": \"b->rep.VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"Transaction\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put_cf\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge_cf\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete_cf\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_commit\",\n          \"call_expr\": \"txn->rep->Commit\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback\",\n          \"call_expr\": \"txn->rep->Rollback\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_put_log_data\",\n          \"call_expr\": \"txn->rep->PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_set_savepoint\",\n          \"call_expr\": \"txn->rep->SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback_to_savepoint\",\n          \"call_expr\": \"txn->rep->RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDB simple\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put_cf\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge_cf\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete_cf\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_wal\",\n          \"call_expr\": \"txn_db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_cf\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_data_block_hash_ratio\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.data_block_hash_table_util_ratio\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_top_level_index_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.top_level_index_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_partition_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.partition_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_unpartitioned_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.unpartitioned_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"JobInfo metadata simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.input_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.output_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_elapsed_micros\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.elapsed_micros\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_corrupt_keys\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_corrupt_keys\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_input_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_output_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_input_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_input_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_output_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_output_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files_at_output_level\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files_at_output_level\"\n        },\n        {\n          \"kind\": \"string_field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cf_name\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"len_type\": \"size_t*\",\n          \"len_name\": \"size\",\n          \"expr\": \"info->rep.cf_name\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cur\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.cur)\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_prev\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.prev)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CuckooOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_cuckoo_options_set_hash_ratio\",\n          \"receiver_type\": \"rocksdb_cuckoo_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.hash_table_ratio\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Options simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"zstd_max_train_bytes\",\n          \"field\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"unsigned char\",\n          \"value_name\": \"use_zstd_dict_trainer\",\n          \"field\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"value\",\n          \"field\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"uint64_t\",\n          \"value_name\": \"max_dict_buffer_bytes\",\n          \"field\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_bottommost_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.bottommost_compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"use_fsync\",\n          \"field\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_disable_auto_compactions\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"disable\",\n          \"field\": \"opt->rep.disable_auto_compactions\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_optimize_filters_for_hits\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.optimize_filters_for_hits\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_report_bg_io_stats\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.report_bg_io_stats\"\n        }\n      ]\n    }\n  ]\n}\n","tools/c_api_gen/auto_simple_bindings_blocklist.json":"{\n  \"schema_version\": 1,\n  \"families\": [\n    {\n      \"name\": \"ReadOptions\",\n      \"entries\": [\n        {\n          \"field\": \"snapshot\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"timestamp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iter_start_ts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"merge_operand_count_threshold\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_lower_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_upper_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"table_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental index-selection compatibility policy that needs explicit legacy C API mapping.\"\n        },\n        {\n          \"field\": \"table_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Non-owning pointer paired with the legacy C read-options factory shim; the C wrapper owns a shared_ptr and stores this borrowed pointer.\"\n        },\n        {\n          \"field\": \"request_id\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_scoped_block_buffer_provider\",\n          \"policy\": \"manual\",\n          \"reason\": \"Field type 'ReadScopedBlockBufferProvider *' is a pointer/owning handle to a complex type; needs an explicit C ownership and lifetime design rather than a simple scalar/enum/string wrapper.\"\n        },\n        {\n          \"field\": \"custom_context\",\n          \"policy\": \"manual\",\n          \"reason\": \"Opaque non-owning pointer needs an explicit C ownership and lifetime design rather than a generated binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"DBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"mutex_hold_log_threshold_us\",\n          \"policy\": \"deferred\",\n          \"reason\": \"Experimental mutex diagnostics are configured through the existing DB option string API until the behavior and overhead are qualified.\"\n        },\n        {\n          \"field\": \"env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"sst_file_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"statistics\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"db_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"write_buffer_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"listeners\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"row_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"wal_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"file_checksum_gen_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"checksum_handoff_file_types\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"compaction_service\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"calculate_sst_write_lifetime_hint_set\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"max_manifest_file_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"writable_file_max_buffer_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses uint64_t but C++ field is size_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"AdvancedColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"inplace_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_insert_with_hint_prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compression_per_level\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"max_bytes_for_level_multiplier_additional\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_universal\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_fifo\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"table_properties_collector_factories\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"CompressionOptions is a nested struct; needs explicit C bridging (matches existing compaction_options_universal/fifo pattern).\"\n        },\n        {\n          \"field\": \"blob_direct_write_partition_strategy\",\n          \"policy\": \"manual\",\n          \"reason\": \"std::shared_ptr<BlobFilePartitionStrategy> \\u2014 factory/ownership-transfer type; needs explicit C bridging.\"\n        },\n        {\n          \"field\": \"soft_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"hard_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"comparator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"merge_operator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"bottommost_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"table_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"cf_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_thread_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"sst_partitioner_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"EnvOptions\",\n      \"entries\": [\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores an external object pointer that needs explicit ownership policy in the C API.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactRangeOptions\",\n      \"entries\": [\n        {\n          \"field\": \"full_history_ts_low\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        },\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OpenAndCompactOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"GetColumnFamilyMetaDataOptions\",\n      \"entries\": [\n        {\n          \"field\": \"range\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a range object that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedTableOptions\",\n      \"entries\": [\n        {\n          \"field\": \"flush_block_policy_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"metadata_cache_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"block_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"persistent_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"cache_usage_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"filter_policy\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"user_defined_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"use_udi_as_primary_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"fail_if_no_udi_on_open\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"index_mode\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental enum semantics plus legacy UDI boolean compatibility wrappers that need explicit mapping.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptionsFIFO\",\n      \"entries\": [\n        {\n          \"field\": \"file_temperature_age_thresholds\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses collection-style configuration that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BackupEngineOptions\",\n      \"entries\": [\n        {\n          \"field\": \"backup_env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"backup_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"restore_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CreateBackupOptions\",\n      \"entries\": [\n        {\n          \"field\": \"progress_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        },\n        {\n          \"field\": \"exclude_files_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"RestoreOptions\",\n      \"entries\": [\n        {\n          \"field\": \"alternate_dirs\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a collection of alternate directories that needs explicit marshalling.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"custom_mutex_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"lock_mgr_handle\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"rollback_deletion_type_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"secondary_indices\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_snapshot_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_commit_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"autogenerate_name\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"cmp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores a comparator-like object pointer that needs explicit ownership policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"shared_lock_buckets\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses shared internal synchronization state that should not be exposed as a blind field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"FlushJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"input_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"input_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_garbage_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"SubcompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ExternalFileIngestionInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TableProperties\",\n      \"entries\": [\n        {\n          \"field\": \"user_collected_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"readable_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        }\n      ]\n    }\n  ]\n}\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Agent Instructions\n\nThis repository's authoritative agent instructions live in `CLAUDE.md`.\n\nRead and follow [`CLAUDE.md`](./CLAUDE.md) in full before making changes or\nreviewing code in this checkout.\n\nIf there is any ambiguity between this file and `CLAUDE.md`, `CLAUDE.md` takes\nprecedence.\n","isInternal":false,"tokens":73,"sizeBytes":296},{"name":"abi_type_overrides.json","path":"tools/c_api_gen/abi_type_overrides.json","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/c_api_gen/abi_type_overrides.json","title":"C_api_gen Skill","category":"anthropic-skill","format":"json","content":"{\n  \"schema_version\": 1,\n  \"description\": [\n    \"ABI-preserving C type overrides for auto-generated C API wrappers.\",\n    \"\",\n    \"RocksDB's C API has a strong backward-compatibility guarantee: the C\",\n    \"signature of a function that has already shipped must never change, even\",\n    \"when the underlying C++ field type would naturally map to a different C\",\n    \"type. The auto-generator derives the C type from the C++ field (e.g. bool\",\n    \"-> unsigned char, uint64_t -> uint64_t, an enum -> int). For a handful of\",\n    \"pre-existing functions the historical hand-written C type differs from\",\n    \"that natural mapping, so we pin it here. The generated body still casts to\",\n    \"the real C++ field type via static_cast<decltype(field)>(value), so the\",\n    \"behavior is identical -- only the public C parameter/return type is held\",\n    \"stable.\",\n    \"\",\n    \"Only add entries for functions that already shipped with a different type.\",\n    \"Brand-new functions should use the natural mapping. The equivalence\",\n    \"validator (validate_generated_equivalence.py) enforces that generated\",\n    \"signatures match the reference revision, so any unintended drift here will\",\n    \"fail CI.\"\n  ],\n  \"overrides\": [\n    {\n      \"function\": \"rocksdb_writeoptions_disable_WAL\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int disable` long before codegen; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_restore_options_set_keep_log_files\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int v`; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_checksum\",\n      \"role\": \"setter\",\n      \"c_type\": \"char\",\n      \"field_cxx_type\": \"ChecksumType\",\n      \"reason\": \"Shipped as `char`; the field is the ChecksumType enum but the C parameter type must stay `char` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_format_version\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"uint32_t\",\n      \"reason\": \"Shipped as `int`; the field is uint32_t but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_block_size\",\n      \"role\": \"setter\",\n      \"c_type\": \"size_t\",\n      \"field_cxx_type\": \"uint64_t\",\n      \"reason\": \"Shipped as `size_t block_size`; the field is uint64_t but the C parameter type must stay `size_t` for ABI compatibility.\"\n    }\n  ]\n}\n","frontmatter":{"schema_version":1,"description":["ABI-preserving C type overrides for auto-generated C API wrappers.","","RocksDB's C API has a strong backward-compatibility guarantee: the C","signature of a function that has already shipped must never change, even","when the underlying C++ field type would naturally map to a different C","type. The auto-generator derives the C type from the C++ field (e.g. bool","-> unsigned char, uint64_t -> uint64_t, an enum -> int). For a handful of","pre-existing functions the historical hand-written C type differs from","that natural mapping, so we pin it here. The generated body still casts to","the real C++ field type via static_cast<decltype(field)>(value), so the","behavior is identical -- only the public C parameter/return type is held","stable.","","Only add entries for functions that already shipped with a different type.","Brand-new functions should use the natural mapping. The equivalence","validator (validate_generated_equivalence.py) enforces that generated","signatures match the reference revision, so any unintended drift here will","fail CI."],"overrides":[{"function":"rocksdb_writeoptions_disable_WAL","role":"setter","c_type":"int","field_cxx_type":"bool","reason":"Shipped as `int disable` long before codegen; the field is bool but the C parameter type must stay `int` for ABI compatibility."},{"function":"rocksdb_restore_options_set_keep_log_files","role":"setter","c_type":"int","field_cxx_type":"bool","reason":"Shipped as `int v`; the field is bool but the C parameter type must stay `int` for ABI compatibility."},{"function":"rocksdb_block_based_options_set_checksum","role":"setter","c_type":"char","field_cxx_type":"ChecksumType","reason":"Shipped as `char`; the field is the ChecksumType enum but the C parameter type must stay `char` for ABI compatibility."},{"function":"rocksdb_block_based_options_set_format_version","role":"setter","c_type":"int","field_cxx_type":"uint32_t","reason":"Shipped as `int`; the field is uint32_t but the C parameter type must stay `int` for ABI compatibility."},{"function":"rocksdb_block_based_options_set_block_size","role":"setter","c_type":"size_t","field_cxx_type":"uint64_t","reason":"Shipped as `size_t block_size`; the field is uint64_t but the C parameter type must stay `size_t` for ABI compatibility."}]},"isInternal":false,"tokens":667,"sizeBytes":2679},{"name":"api_compatibility_allowlist.json","path":"tools/c_api_gen/api_compatibility_allowlist.json","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/c_api_gen/api_compatibility_allowlist.json","title":"C_api_gen Skill","category":"anthropic-skill","format":"json","content":"{\n  \"schema_version\": 1,\n  \"description\": [\n    \"Documented, intentional backward-incompatible changes to the public C API\",\n    \"(include/rocksdb/c.h), checked by check_api_compatibility.py.\",\n    \"\",\n    \"Each entry suppresses one otherwise-failing finding. 'kind' is 'removed'\",\n    \"(a function that existed in the baseline is gone) or 'changed' (its\",\n    \"signature changed). Only add entries for changes that are deliberate and\",\n    \"reviewed; every entry needs a reason.\"\n  ],\n  \"allow\": [\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_writebatch_wi_create_from\",\n      \"reason\": \"Declared in c.h but never implemented anywhere in RocksDB (WriteBatchWithIndex has no constructor from a serialized representation). The symbol never existed, so no consumer could have linked against it; the dead declaration was removed.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_user_key_common_prefix\",\n      \"reason\": \"Getter for the format_version 8 'user_key_common_prefix' table property, which a predecessor (D116105558) reserved for a whole-file common-prefix optimization that was investigated and rejected. The property and this generated getter are removed before format_version 8 (and thus the property) appears in any release, so no released consumer could depend on it.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_set_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_get_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_external_sst_file_global_seqno_offset\",\n      \"reason\": \"Removed after write_global_seqno was removed because RocksDB no longer mutates the global sequence number stored in external SST files during ingestion.\"\n    }\n  ]\n}\n","frontmatter":{"schema_version":1,"description":["Documented, intentional backward-incompatible changes to the public C API","(include/rocksdb/c.h), checked by check_api_compatibility.py.","","Each entry suppresses one otherwise-failing finding. 'kind' is 'removed'","(a function that existed in the baseline is gone) or 'changed' (its","signature changed). Only add entries for changes that are deliberate and","reviewed; every entry needs a reason."],"allow":[{"kind":"removed","function":"rocksdb_writebatch_wi_create_from","reason":"Declared in c.h but never implemented anywhere in RocksDB (WriteBatchWithIndex has no constructor from a serialized representation). The symbol never existed, so no consumer could have linked against it; the dead declaration was removed."},{"kind":"removed","function":"rocksdb_table_properties_user_key_common_prefix","reason":"Getter for the format_version 8 'user_key_common_prefix' table property, which a predecessor (D116105558) reserved for a whole-file common-prefix optimization that was investigated and rejected. The property and this generated getter are removed before format_version 8 (and thus the property) appears in any release, so no released consumer could depend on it."},{"kind":"removed","function":"rocksdb_ingestexternalfileoptions_set_write_global_seqno","reason":"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST."},{"kind":"removed","function":"rocksdb_ingestexternalfileoptions_get_write_global_seqno","reason":"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST."},{"kind":"removed","function":"rocksdb_table_properties_external_sst_file_global_seqno_offset","reason":"Removed after write_global_seqno was removed because RocksDB no longer mutates the global sequence number stored in external SST files during ingestion."}]},"isInternal":false,"tokens":502,"sizeBytes":2207},{"name":"auto_simple_bindings_blocklist.json","path":"tools/c_api_gen/auto_simple_bindings_blocklist.json","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/c_api_gen/auto_simple_bindings_blocklist.json","title":"C_api_gen Skill","category":"anthropic-skill","format":"json","content":"{\n  \"schema_version\": 1,\n  \"families\": [\n    {\n      \"name\": \"ReadOptions\",\n      \"entries\": [\n        {\n          \"field\": \"snapshot\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"timestamp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iter_start_ts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"merge_operand_count_threshold\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_lower_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_upper_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"table_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental index-selection compatibility policy that needs explicit legacy C API mapping.\"\n        },\n        {\n          \"field\": \"table_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Non-owning pointer paired with the legacy C read-options factory shim; the C wrapper owns a shared_ptr and stores this borrowed pointer.\"\n        },\n        {\n          \"field\": \"request_id\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_scoped_block_buffer_provider\",\n          \"policy\": \"manual\",\n          \"reason\": \"Field type 'ReadScopedBlockBufferProvider *' is a pointer/owning handle to a complex type; needs an explicit C ownership and lifetime design rather than a simple scalar/enum/string wrapper.\"\n        },\n        {\n          \"field\": \"custom_context\",\n          \"policy\": \"manual\",\n          \"reason\": \"Opaque non-owning pointer needs an explicit C ownership and lifetime design rather than a generated binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"DBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"mutex_hold_log_threshold_us\",\n          \"policy\": \"deferred\",\n          \"reason\": \"Experimental mutex diagnostics are configured through the existing DB option string API until the behavior and overhead are qualified.\"\n        },\n        {\n          \"field\": \"env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"sst_file_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"statistics\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"db_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"write_buffer_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"listeners\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"row_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"wal_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"file_checksum_gen_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"checksum_handoff_file_types\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"compaction_service\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"calculate_sst_write_lifetime_hint_set\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"max_manifest_file_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"writable_file_max_buffer_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses uint64_t but C++ field is size_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"AdvancedColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"inplace_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_insert_with_hint_prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compression_per_level\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"max_bytes_for_level_multiplier_additional\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_universal\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_fifo\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"table_properties_collector_factories\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"CompressionOptions is a nested struct; needs explicit C bridging (matches existing compaction_options_universal/fifo pattern).\"\n        },\n        {\n          \"field\": \"blob_direct_write_partition_strategy\",\n          \"policy\": \"manual\",\n          \"reason\": \"std::shared_ptr<BlobFilePartitionStrategy> \\u2014 factory/ownership-transfer type; needs explicit C bridging.\"\n        },\n        {\n          \"field\": \"soft_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"hard_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"comparator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"merge_operator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"bottommost_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"table_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"cf_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_thread_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"sst_partitioner_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"EnvOptions\",\n      \"entries\": [\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores an external object pointer that needs explicit ownership policy in the C API.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactRangeOptions\",\n      \"entries\": [\n        {\n          \"field\": \"full_history_ts_low\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        },\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OpenAndCompactOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"GetColumnFamilyMetaDataOptions\",\n      \"entries\": [\n        {\n          \"field\": \"range\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a range object that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedTableOptions\",\n      \"entries\": [\n        {\n          \"field\": \"flush_block_policy_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"metadata_cache_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"block_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"persistent_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"cache_usage_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"filter_policy\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"user_defined_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"use_udi_as_primary_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"fail_if_no_udi_on_open\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"index_mode\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental enum semantics plus legacy UDI boolean compatibility wrappers that need explicit mapping.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptionsFIFO\",\n      \"entries\": [\n        {\n          \"field\": \"file_temperature_age_thresholds\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses collection-style configuration that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BackupEngineOptions\",\n      \"entries\": [\n        {\n          \"field\": \"backup_env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"backup_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"restore_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CreateBackupOptions\",\n      \"entries\": [\n        {\n          \"field\": \"progress_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        },\n        {\n          \"field\": \"exclude_files_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"RestoreOptions\",\n      \"entries\": [\n        {\n          \"field\": \"alternate_dirs\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a collection of alternate directories that needs explicit marshalling.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"custom_mutex_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"lock_mgr_handle\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"rollback_deletion_type_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"secondary_indices\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_snapshot_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_commit_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"autogenerate_name\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"cmp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores a comparator-like object pointer that needs explicit ownership policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"shared_lock_buckets\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses shared internal synchronization state that should not be exposed as a blind field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"FlushJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"input_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"input_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_garbage_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"SubcompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ExternalFileIngestionInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TableProperties\",\n      \"entries\": [\n        {\n          \"field\": \"user_collected_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"readable_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        }\n      ]\n    }\n  ]\n}\n","frontmatter":{"schema_version":1,"families":[{"name":"ReadOptions","entries":[{"field":"snapshot","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"timestamp","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"iter_start_ts","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"merge_operand_count_threshold","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"iterate_lower_bound","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"iterate_upper_bound","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"table_filter","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"read_index","policy":"manual","reason":"Uses experimental index-selection compatibility policy that needs explicit legacy C API mapping."},{"field":"table_index_factory","policy":"manual","reason":"Non-owning pointer paired with the legacy C read-options factory shim; the C wrapper owns a shared_ptr and stores this borrowed pointer."},{"field":"request_id","policy":"manual","reason":"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer."},{"field":"read_scoped_block_buffer_provider","policy":"manual","reason":"Field type 'ReadScopedBlockBufferProvider *' is a pointer/owning handle to a complex type; needs an explicit C ownership and lifetime design rather than a simple scalar/enum/string wrapper."},{"field":"custom_context","policy":"manual","reason":"Opaque non-owning pointer needs an explicit C ownership and lifetime design rather than a generated binding."}]},{"name":"DBOptions","entries":[{"field":"mutex_hold_log_threshold_us","policy":"deferred","reason":"Experimental mutex diagnostics are configured through the existing DB option string API until the behavior and overhead are qualified."},{"field":"env","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"rate_limiter","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"sst_file_manager","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"info_log","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"statistics","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"db_paths","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"write_buffer_manager","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"listeners","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"row_cache","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"wal_filter","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"file_checksum_gen_factory","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"checksum_handoff_file_types","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"compaction_service","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"calculate_sst_write_lifetime_hint_set","policy":"manual","reason":"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy."},{"field":"max_manifest_file_size","policy":"manual","reason":"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility."},{"field":"writable_file_max_buffer_size","policy":"manual","reason":"ABI type mismatch: legacy C API uses uint64_t but C++ field is size_t. Hand-written binding preserved for ABI compatibility."}]},{"name":"AdvancedColumnFamilyOptions","entries":[{"field":"inplace_callback","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"memtable_insert_with_hint_prefix_extractor","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"compression_per_level","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"max_bytes_for_level_multiplier_additional","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"compaction_options_universal","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"compaction_options_fifo","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"memtable_factory","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"table_properties_collector_factories","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"blob_cache","policy":"manual","reason":"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging."},{"field":"blob_compression_opts","policy":"manual","reason":"CompressionOptions is a nested struct; needs explicit C bridging (matches existing compaction_options_universal/fifo pattern)."},{"field":"blob_direct_write_partition_strategy","policy":"manual","reason":"std::shared_ptr<BlobFilePartitionStrategy> — factory/ownership-transfer type; needs explicit C bridging."},{"field":"soft_pending_compaction_bytes_limit","policy":"manual","reason":"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility."},{"field":"hard_pending_compaction_bytes_limit","policy":"manual","reason":"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility."}]},{"name":"ColumnFamilyOptions","entries":[{"field":"comparator","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"merge_operator","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"compaction_filter","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"compaction_filter_factory","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"bottommost_compression_opts","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"compression_opts","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"compression_manager","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"prefix_extractor","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"table_factory","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"cf_paths","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"compaction_thread_limiter","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."},{"field":"sst_partitioner_factory","policy":"manual","reason":"Uses custom components or nested option objects that need hand-designed C bridging."}]},{"name":"EnvOptions","entries":[{"field":"rate_limiter","policy":"manual","reason":"Stores an external object pointer that needs explicit ownership policy in the C API."}]},{"name":"CompactionOptions","entries":[{"field":"canceled","policy":"manual","reason":"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper."}]},{"name":"CompactRangeOptions","entries":[{"field":"full_history_ts_low","policy":"manual","reason":"Uses caller-owned cancellation or timestamp state that needs explicit C API policy."},{"field":"canceled","policy":"manual","reason":"Uses caller-owned cancellation or timestamp state that needs explicit C API policy."}]},{"name":"OpenAndCompactOptions","entries":[{"field":"canceled","policy":"manual","reason":"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper."}]},{"name":"GetColumnFamilyMetaDataOptions","entries":[{"field":"range","policy":"manual","reason":"Uses a range object that needs dedicated marshalling rather than a simple scalar binding."}]},{"name":"BlockBasedTableOptions","entries":[{"field":"flush_block_policy_factory","policy":"manual","reason":"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling."},{"field":"metadata_cache_options","policy":"manual","reason":"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling."},{"field":"block_cache","policy":"manual","reason":"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling."},{"field":"persistent_cache","policy":"manual","reason":"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling."},{"field":"cache_usage_options","policy":"manual","reason":"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling."},{"field":"filter_policy","policy":"manual","reason":"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling."},{"field":"user_defined_index_factory","policy":"manual","reason":"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling."},{"field":"use_udi_as_primary_index","policy":"manual","reason":"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics."},{"field":"fail_if_no_udi_on_open","policy":"manual","reason":"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics."},{"field":"index_mode","policy":"manual","reason":"Uses experimental enum semantics plus legacy UDI boolean compatibility wrappers that need explicit mapping."}]},{"name":"CompactionOptionsFIFO","entries":[{"field":"file_temperature_age_thresholds","policy":"manual","reason":"Uses collection-style configuration that needs dedicated marshalling rather than a simple scalar binding."}]},{"name":"BackupEngineOptions","entries":[{"field":"backup_env","policy":"manual","reason":"Stores external objects and rate limiters that need explicit C ownership and lifetime policy."},{"field":"info_log","policy":"manual","reason":"Stores external objects and rate limiters that need explicit C ownership and lifetime policy."},{"field":"backup_rate_limiter","policy":"manual","reason":"Stores external objects and rate limiters that need explicit C ownership and lifetime policy."},{"field":"restore_rate_limiter","policy":"manual","reason":"Stores external objects and rate limiters that need explicit C ownership and lifetime policy."}]},{"name":"CreateBackupOptions","entries":[{"field":"progress_callback","policy":"manual","reason":"Uses callback hooks that need dedicated C callback plumbing."},{"field":"exclude_files_callback","policy":"manual","reason":"Uses callback hooks that need dedicated C callback plumbing."}]},{"name":"RestoreOptions","entries":[{"field":"alternate_dirs","policy":"manual","reason":"Uses a collection of alternate directories that needs explicit marshalling."}]},{"name":"TransactionDBOptions","entries":[{"field":"custom_mutex_factory","policy":"manual","reason":"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging."},{"field":"lock_mgr_handle","policy":"manual","reason":"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging."},{"field":"rollback_deletion_type_callback","policy":"manual","reason":"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging."},{"field":"secondary_indices","policy":"manual","reason":"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging."},{"field":"wp_snapshot_cache_bits","policy":"manual","reason":"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging."},{"field":"wp_commit_cache_bits","policy":"manual","reason":"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging."},{"field":"autogenerate_name","policy":"manual","reason":"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging."}]},{"name":"OptimisticTransactionOptions","entries":[{"field":"cmp","policy":"manual","reason":"Stores a comparator-like object pointer that needs explicit ownership policy."}]},{"name":"OptimisticTransactionDBOptions","entries":[{"field":"shared_lock_buckets","policy":"manual","reason":"Uses shared internal synchronization state that should not be exposed as a blind field wrapper."}]},{"name":"FlushJobInfo","entries":[{"field":"table_properties","policy":"manual","reason":"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter."},{"field":"blob_file_addition_infos","policy":"manual","reason":"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter."}]},{"name":"CompactionJobInfo","entries":[{"field":"input_files","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."},{"field":"input_file_infos","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."},{"field":"output_files","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."},{"field":"output_file_infos","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."},{"field":"table_properties","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."},{"field":"stats","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."},{"field":"blob_file_addition_infos","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."},{"field":"blob_file_garbage_infos","policy":"manual","reason":"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter."}]},{"name":"SubcompactionJobInfo","entries":[{"field":"stats","policy":"manual","reason":"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter."}]},{"name":"ExternalFileIngestionInfo","entries":[{"field":"table_properties","policy":"manual","reason":"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter."}]},{"name":"TableProperties","entries":[{"field":"user_collected_properties","policy":"manual","reason":"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter."},{"field":"readable_properties","policy":"manual","reason":"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter."}]}]},"isInternal":false,"tokens":4866,"sizeBytes":23649},{"name":"equivalence_allowlist.json","path":"tools/c_api_gen/equivalence_allowlist.json","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/c_api_gen/equivalence_allowlist.json","title":"C_api_gen Skill","category":"anthropic-skill","format":"json","content":"{\n  \"allowlist\": [\n    {\n      \"name\": \"rocksdb_transactiondb_options_set_use_per_key_point_lock_mgr\",\n      \"reason\": \"The old handwritten implementation existed in db/c.cc but was not declared in include/rocksdb/c.h. The generated declaration intentionally fixes that historical inconsistency.\"\n    }\n  ]\n}\n","frontmatter":{"allowlist":[{"name":"rocksdb_transactiondb_options_set_use_per_key_point_lock_mgr","reason":"The old handwritten implementation existed in db/c.cc but was not declared in include/rocksdb/c.h. The generated declaration intentionally fixes that historical inconsistency."}]},"isInternal":false,"tokens":69,"sizeBytes":309},{"name":"spec.json","path":"tools/c_api_gen/spec.json","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/c_api_gen/spec.json","title":"C_api_gen Skill","category":"anthropic-skill","format":"json","content":"{\n  \"sections\": [\n    {\n      \"name\": \"DB data operations\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge_cf\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_range_cf\",\n          \"call_expr\": \"db->rep->DeleteRange\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"start_key\",\n              \"len_name\": \"start_key_len\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"end_key\",\n              \"len_name\": \"end_key_len\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(start_key, start_key_len)\",\n            \"Slice(end_key, end_key_len)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_cf\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_wal\",\n          \"call_expr\": \"db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_pause_background_work\",\n          \"call_expr\": \"db->rep->PauseBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_continue_background_work\",\n          \"call_expr\": \"db->rep->ContinueBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_disable_file_deletions\",\n          \"call_expr\": \"db->rep->DisableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_enable_file_deletions\",\n          \"call_expr\": \"db->rep->EnableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_checksum\",\n          \"call_expr\": \"db->rep->VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_file_checksums\",\n          \"call_expr\": \"db->rep->VerifyFileChecksums\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": [\n            \"ReadOptions()\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_destroy_db\",\n          \"call_expr\": \"DestroyDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_repair_db\",\n          \"call_expr\": \"RepairDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"WriteBatch\",\n      \"functions\": [\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_clear\",\n          \"call_expr\": \"b->rep.Clear\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_cf\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_delete\",\n          \"call_expr\": \"b->rep.Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_log_data\",\n          \"call_expr\": \"b->rep.PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_set_save_point\",\n          \"call_expr\": \"b->rep.SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_rollback_to_save_point\",\n          \"call_expr\": \"b->rep.RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_pop_save_point\",\n          \"call_expr\": \"b->rep.PopSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_verify_checksum\",\n          \"call_expr\": \"b->rep.VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"Transaction\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put_cf\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge_cf\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete_cf\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_commit\",\n          \"call_expr\": \"txn->rep->Commit\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback\",\n          \"call_expr\": \"txn->rep->Rollback\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_put_log_data\",\n          \"call_expr\": \"txn->rep->PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_set_savepoint\",\n          \"call_expr\": \"txn->rep->SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback_to_savepoint\",\n          \"call_expr\": \"txn->rep->RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDB simple\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put_cf\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge_cf\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete_cf\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_wal\",\n          \"call_expr\": \"txn_db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_cf\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_data_block_hash_ratio\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.data_block_hash_table_util_ratio\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_top_level_index_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.top_level_index_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_partition_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.partition_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_unpartitioned_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.unpartitioned_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"JobInfo metadata simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.input_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.output_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_elapsed_micros\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.elapsed_micros\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_corrupt_keys\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_corrupt_keys\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_input_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_output_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_input_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_input_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_output_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_output_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files_at_output_level\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files_at_output_level\"\n        },\n        {\n          \"kind\": \"string_field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cf_name\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"len_type\": \"size_t*\",\n          \"len_name\": \"size\",\n          \"expr\": \"info->rep.cf_name\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cur\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.cur)\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_prev\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.prev)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CuckooOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_cuckoo_options_set_hash_ratio\",\n          \"receiver_type\": \"rocksdb_cuckoo_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.hash_table_ratio\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Options simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"zstd_max_train_bytes\",\n          \"field\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"unsigned char\",\n          \"value_name\": \"use_zstd_dict_trainer\",\n          \"field\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"value\",\n          \"field\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"uint64_t\",\n          \"value_name\": \"max_dict_buffer_bytes\",\n          \"field\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_bottommost_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.bottommost_compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"use_fsync\",\n          \"field\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_disable_auto_compactions\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"disable\",\n          \"field\": \"opt->rep.disable_auto_compactions\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_optimize_filters_for_hits\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.optimize_filters_for_hits\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_report_bg_io_stats\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.report_bg_io_stats\"\n        }\n      ]\n    }\n  ]\n}\n","frontmatter":{"sections":[{"name":"DB data operations","functions":[{"kind":"status_method","name":"rocksdb_put","call_expr":"db->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"val","len_name":"vallen"}],"method_args":["options->rep","Slice(key, keylen)","Slice(val, vallen)"]},{"kind":"status_method","name":"rocksdb_put_cf","call_expr":"db->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"val","len_name":"vallen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)","Slice(val, vallen)"]},{"kind":"status_method","name":"rocksdb_delete","call_expr":"db->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"keylen"}],"method_args":["options->rep","Slice(key, keylen)"]},{"kind":"status_method","name":"rocksdb_delete_cf","call_expr":"db->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)"]},{"kind":"status_method","name":"rocksdb_merge","call_expr":"db->rep->Merge","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"val","len_name":"vallen"}],"method_args":["options->rep","Slice(key, keylen)","Slice(val, vallen)"]},{"kind":"status_method","name":"rocksdb_merge_cf","call_expr":"db->rep->Merge","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"val","len_name":"vallen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)","Slice(val, vallen)"]},{"kind":"status_method","name":"rocksdb_write","call_expr":"db->rep->Write","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"batch"}],"method_args":["options->rep","&batch->rep"]},{"kind":"status_method","name":"rocksdb_put_with_ts","call_expr":"db->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"ts","len_name":"tslen"},{"kind":"slice","name":"val","len_name":"vallen"}],"method_args":["options->rep","Slice(key, keylen)","Slice(ts, tslen)","Slice(val, vallen)"]},{"kind":"status_method","name":"rocksdb_put_cf_with_ts","call_expr":"db->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"ts","len_name":"tslen"},{"kind":"slice","name":"val","len_name":"vallen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)","Slice(ts, tslen)","Slice(val, vallen)"]},{"kind":"status_method","name":"rocksdb_delete_with_ts","call_expr":"db->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"ts","len_name":"tslen"}],"method_args":["options->rep","Slice(key, keylen)","Slice(ts, tslen)"]},{"kind":"status_method","name":"rocksdb_delete_cf_with_ts","call_expr":"db->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"ts","len_name":"tslen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)","Slice(ts, tslen)"]},{"kind":"status_method","name":"rocksdb_singledelete","call_expr":"db->rep->SingleDelete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"keylen"}],"method_args":["options->rep","Slice(key, keylen)"]},{"kind":"status_method","name":"rocksdb_singledelete_cf","call_expr":"db->rep->SingleDelete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)"]},{"kind":"status_method","name":"rocksdb_singledelete_with_ts","call_expr":"db->rep->SingleDelete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"ts","len_name":"tslen"}],"method_args":["options->rep","Slice(key, keylen)","Slice(ts, tslen)"]},{"kind":"status_method","name":"rocksdb_singledelete_cf_with_ts","call_expr":"db->rep->SingleDelete","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"ts","len_name":"tslen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)","Slice(ts, tslen)"]},{"kind":"status_method","name":"rocksdb_delete_range_cf","call_expr":"db->rep->DeleteRange","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"start_key","len_name":"start_key_len"},{"kind":"slice","name":"end_key","len_name":"end_key_len"}],"method_args":["options->rep","column_family->rep","Slice(start_key, start_key_len)","Slice(end_key, end_key_len)"]},{"kind":"status_method","name":"rocksdb_flush","call_expr":"db->rep->Flush","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_flushoptions_t*","name":"options"}],"method_args":["options->rep"]},{"kind":"status_method","name":"rocksdb_flush_cf","call_expr":"db->rep->Flush","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_flushoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"}],"method_args":["options->rep","column_family->rep"]},{"kind":"status_method","name":"rocksdb_flush_wal","call_expr":"db->rep->FlushWAL","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"},{"kind":"scalar","c_type":"unsigned char","name":"sync"}],"method_args":["sync"]},{"kind":"status_method","name":"rocksdb_pause_background_work","call_expr":"db->rep->PauseBackgroundWork","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_continue_background_work","call_expr":"db->rep->ContinueBackgroundWork","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_disable_file_deletions","call_expr":"db->rep->DisableFileDeletions","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_enable_file_deletions","call_expr":"db->rep->EnableFileDeletions","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_verify_checksum","call_expr":"db->rep->VerifyChecksum","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_verify_file_checksums","call_expr":"db->rep->VerifyFileChecksums","params":[{"kind":"scalar","c_type":"rocksdb_t*","name":"db"}],"method_args":["ReadOptions()"]},{"kind":"status_method","name":"rocksdb_destroy_db","call_expr":"DestroyDB","params":[{"kind":"scalar","c_type":"const rocksdb_options_t*","name":"options"},{"kind":"scalar","c_type":"const char*","name":"name"}],"method_args":["name","options->rep"]},{"kind":"status_method","name":"rocksdb_repair_db","call_expr":"RepairDB","params":[{"kind":"scalar","c_type":"const rocksdb_options_t*","name":"options"},{"kind":"scalar","c_type":"const char*","name":"name"}],"method_args":["name","options->rep"]}]},{"name":"WriteBatch","functions":[{"kind":"void_method","name":"rocksdb_writebatch_clear","call_expr":"b->rep.Clear","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"}],"method_args":[]},{"kind":"void_method","name":"rocksdb_writebatch_put","call_expr":"b->rep.Put","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["Slice(key, klen)","Slice(val, vlen)"]},{"kind":"void_method","name":"rocksdb_writebatch_put_cf","call_expr":"b->rep.Put","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["column_family->rep","Slice(key, klen)","Slice(val, vlen)"]},{"kind":"void_method","name":"rocksdb_writebatch_delete","call_expr":"b->rep.Delete","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"},{"kind":"slice","name":"key","len_name":"klen"}],"method_args":["Slice(key, klen)"]},{"kind":"void_method","name":"rocksdb_writebatch_put_log_data","call_expr":"b->rep.PutLogData","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"},{"kind":"slice","name":"blob","len_name":"len"}],"method_args":["Slice(blob, len)"]},{"kind":"void_method","name":"rocksdb_writebatch_set_save_point","call_expr":"b->rep.SetSavePoint","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_writebatch_rollback_to_save_point","call_expr":"b->rep.RollbackToSavePoint","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_writebatch_pop_save_point","call_expr":"b->rep.PopSavePoint","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_writebatch_verify_checksum","call_expr":"b->rep.VerifyChecksum","params":[{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"b"}],"method_args":[]}]},{"name":"Transaction","functions":[{"kind":"status_method","name":"rocksdb_transaction_put","call_expr":"txn->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["Slice(key, klen)","Slice(val, vlen)"]},{"kind":"status_method","name":"rocksdb_transaction_put_cf","call_expr":"txn->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["column_family->rep","Slice(key, klen)","Slice(val, vlen)"]},{"kind":"status_method","name":"rocksdb_transaction_merge","call_expr":"txn->rep->Merge","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["Slice(key, klen)","Slice(val, vlen)"]},{"kind":"status_method","name":"rocksdb_transaction_merge_cf","call_expr":"txn->rep->Merge","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["column_family->rep","Slice(key, klen)","Slice(val, vlen)"]},{"kind":"status_method","name":"rocksdb_transaction_delete","call_expr":"txn->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"},{"kind":"slice","name":"key","len_name":"klen"}],"method_args":["Slice(key, klen)"]},{"kind":"status_method","name":"rocksdb_transaction_delete_cf","call_expr":"txn->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"klen"}],"method_args":["column_family->rep","Slice(key, klen)"]},{"kind":"status_method","name":"rocksdb_transaction_commit","call_expr":"txn->rep->Commit","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_transaction_rollback","call_expr":"txn->rep->Rollback","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"}],"method_args":[]},{"kind":"void_method","name":"rocksdb_transaction_put_log_data","call_expr":"txn->rep->PutLogData","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"},{"kind":"slice","name":"blob","len_name":"len"}],"method_args":["Slice(blob, len)"]},{"kind":"void_method","name":"rocksdb_transaction_set_savepoint","call_expr":"txn->rep->SetSavePoint","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"}],"method_args":[]},{"kind":"status_method","name":"rocksdb_transaction_rollback_to_savepoint","call_expr":"txn->rep->RollbackToSavePoint","params":[{"kind":"scalar","c_type":"rocksdb_transaction_t*","name":"txn"}],"method_args":[]}]},{"name":"TransactionDB simple","functions":[{"kind":"status_method","name":"rocksdb_transactiondb_put","call_expr":"txn_db->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["options->rep","Slice(key, klen)","Slice(val, vlen)"]},{"kind":"status_method","name":"rocksdb_transactiondb_put_cf","call_expr":"txn_db->rep->Put","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"},{"kind":"slice","name":"val","len_name":"vallen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)","Slice(val, vallen)"]},{"kind":"status_method","name":"rocksdb_transactiondb_write","call_expr":"db->rep->Write","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_writebatch_t*","name":"batch"}],"method_args":["options->rep","&batch->rep"]},{"kind":"status_method","name":"rocksdb_transactiondb_merge","call_expr":"txn_db->rep->Merge","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["options->rep","Slice(key, klen)","Slice(val, vlen)"]},{"kind":"status_method","name":"rocksdb_transactiondb_merge_cf","call_expr":"txn_db->rep->Merge","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"klen"},{"kind":"slice","name":"val","len_name":"vlen"}],"method_args":["options->rep","column_family->rep","Slice(key, klen)","Slice(val, vlen)"]},{"kind":"status_method","name":"rocksdb_transactiondb_delete","call_expr":"txn_db->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"slice","name":"key","len_name":"klen"}],"method_args":["options->rep","Slice(key, klen)"]},{"kind":"status_method","name":"rocksdb_transactiondb_delete_cf","call_expr":"txn_db->rep->Delete","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_writeoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"},{"kind":"slice","name":"key","len_name":"keylen"}],"method_args":["options->rep","column_family->rep","Slice(key, keylen)"]},{"kind":"status_method","name":"rocksdb_transactiondb_flush_wal","call_expr":"txn_db->rep->FlushWAL","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"unsigned char","name":"sync"}],"method_args":["sync"]},{"kind":"status_method","name":"rocksdb_transactiondb_flush","call_expr":"txn_db->rep->Flush","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_flushoptions_t*","name":"options"}],"method_args":["options->rep"]},{"kind":"status_method","name":"rocksdb_transactiondb_flush_cf","call_expr":"txn_db->rep->Flush","params":[{"kind":"scalar","c_type":"rocksdb_transactiondb_t*","name":"txn_db"},{"kind":"scalar","c_type":"const rocksdb_flushoptions_t*","name":"options"},{"kind":"scalar","c_type":"rocksdb_column_family_handle_t*","name":"column_family"}],"method_args":["options->rep","column_family->rep"]}]},{"name":"BlockBasedOptions simple","functions":[{"kind":"field_setter","name":"rocksdb_block_based_options_set_data_block_hash_ratio","receiver_type":"rocksdb_block_based_table_options_t*","receiver_name":"options","value_type":"double","value_name":"v","field":"options->rep.data_block_hash_table_util_ratio"},{"kind":"field_setter","name":"rocksdb_block_based_options_set_top_level_index_pinning_tier","receiver_type":"rocksdb_block_based_table_options_t*","receiver_name":"options","value_type":"int","value_name":"v","field":"options->rep.metadata_cache_options.top_level_index_pinning","value_expr":"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)"},{"kind":"field_setter","name":"rocksdb_block_based_options_set_partition_pinning_tier","receiver_type":"rocksdb_block_based_table_options_t*","receiver_name":"options","value_type":"int","value_name":"v","field":"options->rep.metadata_cache_options.partition_pinning","value_expr":"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)"},{"kind":"field_setter","name":"rocksdb_block_based_options_set_unpartitioned_pinning_tier","receiver_type":"rocksdb_block_based_table_options_t*","receiver_name":"options","value_type":"int","value_name":"v","field":"options->rep.metadata_cache_options.unpartitioned_pinning","value_expr":"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)"}]},{"name":"JobInfo metadata simple","functions":[{"kind":"field_getter","name":"rocksdb_compactionjobinfo_input_files_count","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"size_t","expr":"info->rep.input_files.size()"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_output_files_count","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"size_t","expr":"info->rep.output_files.size()"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_elapsed_micros","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"uint64_t","expr":"info->rep.stats.elapsed_micros"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_num_corrupt_keys","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"uint64_t","expr":"info->rep.stats.num_corrupt_keys"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_input_records","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"uint64_t","expr":"info->rep.stats.num_input_records"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_output_records","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"uint64_t","expr":"info->rep.stats.num_output_records"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_total_input_bytes","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"uint64_t","expr":"info->rep.stats.total_input_bytes"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_total_output_bytes","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"uint64_t","expr":"info->rep.stats.total_output_bytes"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_num_input_files","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"size_t","expr":"info->rep.stats.num_input_files"},{"kind":"field_getter","name":"rocksdb_compactionjobinfo_num_input_files_at_output_level","receiver_type":"const rocksdb_compactionjobinfo_t*","receiver_name":"info","return_type":"size_t","expr":"info->rep.stats.num_input_files_at_output_level"},{"kind":"string_field_getter","name":"rocksdb_writestallinfo_cf_name","receiver_type":"const rocksdb_writestallinfo_t*","receiver_name":"info","len_type":"size_t*","len_name":"size","expr":"info->rep.cf_name"},{"kind":"field_getter","name":"rocksdb_writestallinfo_cur","receiver_type":"const rocksdb_writestallinfo_t*","receiver_name":"info","return_type":"const rocksdb_writestallcondition_t*","expr":"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.cur)"},{"kind":"field_getter","name":"rocksdb_writestallinfo_prev","receiver_type":"const rocksdb_writestallinfo_t*","receiver_name":"info","return_type":"const rocksdb_writestallcondition_t*","expr":"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.prev)"}]},{"name":"CuckooOptions simple","functions":[{"kind":"field_setter","name":"rocksdb_cuckoo_options_set_hash_ratio","receiver_type":"rocksdb_cuckoo_table_options_t*","receiver_name":"options","value_type":"double","value_name":"v","field":"options->rep.hash_table_ratio"}]},{"name":"Options simple","functions":[{"kind":"field_setter","name":"rocksdb_options_set_compression_options_zstd_max_train_bytes","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"int","value_name":"zstd_max_train_bytes","field":"opt->rep.compression_opts.zstd_max_train_bytes"},{"kind":"field_getter","name":"rocksdb_options_get_compression_options_zstd_max_train_bytes","receiver_type":"rocksdb_options_t*","receiver_name":"opt","return_type":"int","expr":"opt->rep.compression_opts.zstd_max_train_bytes"},{"kind":"field_setter","name":"rocksdb_options_set_compression_options_use_zstd_dict_trainer","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"unsigned char","value_name":"use_zstd_dict_trainer","field":"opt->rep.compression_opts.use_zstd_dict_trainer"},{"kind":"field_getter","name":"rocksdb_options_get_compression_options_use_zstd_dict_trainer","receiver_type":"rocksdb_options_t*","receiver_name":"opt","return_type":"unsigned char","expr":"opt->rep.compression_opts.use_zstd_dict_trainer"},{"kind":"field_setter","name":"rocksdb_options_set_compression_options_parallel_threads","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"int","value_name":"value","field":"opt->rep.compression_opts.parallel_threads"},{"kind":"field_getter","name":"rocksdb_options_get_compression_options_parallel_threads","receiver_type":"rocksdb_options_t*","receiver_name":"opt","return_type":"int","expr":"opt->rep.compression_opts.parallel_threads"},{"kind":"field_setter","name":"rocksdb_options_set_compression_options_max_dict_buffer_bytes","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"uint64_t","value_name":"max_dict_buffer_bytes","field":"opt->rep.compression_opts.max_dict_buffer_bytes"},{"kind":"field_getter","name":"rocksdb_options_get_compression_options_max_dict_buffer_bytes","receiver_type":"rocksdb_options_t*","receiver_name":"opt","return_type":"uint64_t","expr":"opt->rep.compression_opts.max_dict_buffer_bytes"},{"kind":"field_getter","name":"rocksdb_options_get_bottommost_compression_options_use_zstd_dict_trainer","receiver_type":"rocksdb_options_t*","receiver_name":"opt","return_type":"unsigned char","expr":"opt->rep.bottommost_compression_opts.use_zstd_dict_trainer"},{"kind":"field_setter","name":"rocksdb_options_set_use_fsync","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"int","value_name":"use_fsync","field":"opt->rep.use_fsync"},{"kind":"field_getter","name":"rocksdb_options_get_use_fsync","receiver_type":"rocksdb_options_t*","receiver_name":"opt","return_type":"int","expr":"opt->rep.use_fsync"},{"kind":"field_setter","name":"rocksdb_options_set_disable_auto_compactions","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"int","value_name":"disable","field":"opt->rep.disable_auto_compactions"},{"kind":"field_setter","name":"rocksdb_options_set_optimize_filters_for_hits","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"int","value_name":"v","field":"opt->rep.optimize_filters_for_hits"},{"kind":"field_setter","name":"rocksdb_options_set_report_bg_io_stats","receiver_type":"rocksdb_options_t*","receiver_name":"opt","value_type":"int","value_name":"v","field":"opt->rep.report_bg_io_stats"}]}]},"isInternal":false,"tokens":11393,"sizeBytes":49149},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# RocksDB Code Generation and Review Guidance\n\nThis document provides guidance for generating and reviewing code in the RocksDB project, derived from analysis of code review feedback across hundreds of complex merged Pull Requests. Use this as a reference when writing code with AI assistants or conducting code reviews.\n\n---\n\n## General Best Practices\n\n### Code Quality and Maintainability\n\n**Clarity and Readability:** Write clear, self-documenting code. Use meaningful variable names, add comments for complex logic, and structure code to minimize cognitive load. Avoid clever tricks that sacrifice readability for marginal performance gains unless absolutely necessary.\n\n**Consistent Style:** Follow existing code style conventions. RocksDB uses `.clang-format` for formatting, specific naming conventions, and structural patterns. Deviations from these patterns are frequently flagged in reviews.\n\n**Error Handling:** Ensure robust error handling throughout the codebase. Use RocksDB's `Status` type consistently, propagate errors appropriately, and avoid silently ignoring failures. Reviewers pay close attention to edge cases and failure modes.\n\n**Refactoring traps:** At least in production code, avoid constructs that could allow existing code to unexpectedly, quietly change meaning.\nSpecifically:\n* Avoid new defaulted parameters. This is the #1 trap on refactoring!\n* Avoid static_cast, reinterpret_cast, and C-style casts; static_cast_with_check, up_cast, and lossless_cast from cast_util.h are preferred.\n* Avoid declared type `auto` (`auto&`, `auto*` OK).\n\n### Testing Philosophy\n\n**Comprehensive Coverage:** Every change should include appropriate test coverage. This includes unit tests for isolated functionality, integration tests for component interactions, and stress tests for concurrency and performance validation. Reviewers will ask for additional tests if coverage is insufficient.\n\n**Edge Cases and Failure Modes:** Tests should explicitly cover edge cases, boundary conditions, and potential failure scenarios. This is especially important for changes affecting core database operations, compaction, or recovery logic.\n\n**Platform-Specific Testing:** RocksDB supports multiple platforms (Linux, Windows, macOS) and compilers (GCC, Clang, MSVC). Changes should be tested across relevant platforms, particularly when touching platform-specific code or using compiler-specific features.\n\n### Performance Considerations\n\n**⚠️ PERFORMANCE IS CRITICAL:** RocksDB is a high-performance storage engine where every CPU cycle and memory access matters. When writing code, always evaluate from a performance perspective. This is not optional—performance-aware coding is a fundamental requirement for all contributions.\n\n**Benchmarking and Profiling:** Performance claims should be backed by empirical evidence. Use RocksDB's benchmarking tools (e.g., `db_bench`) to validate improvements. Reviewers will request benchmark results for changes that could impact performance.\n\n**Memory Allocation:** Minimize dynamic memory allocations, especially in hot paths. Prefer stack allocation over heap allocation. Reuse buffers when possible. Consider using arena allocators or memory pools for frequent small allocations. Every `new`, `malloc`, or container resize has a cost.\n\n**Memory Copy:** Avoid unnecessary memory copies. Use move semantics, `std::string_view`, `Slice`, and pass-by-reference where appropriate. Be aware of implicit copies in STL containers and function returns. Prefer in-place operations over copy-and-modify patterns.\n\n**CPU Cache Efficiency:** Design data structures and access patterns to be cache-friendly. Keep frequently accessed data together (data locality). Prefer sequential memory access over random access. Be mindful of cache line sizes (CACHE_LINE_SIZE, typically 64 bytes) and avoid false sharing in concurrent code (see CacheAlignedWrapper). Especially when adding new data members, be mindful of ordering within structs and classes to reduce unnecessary padding (special care with bool members) and avoid larger-than-necessary types (e.g. prefer OptSlice to std::optional<Slice>).\n\n**Loop Optimization:** Look for opportunities to collapse nested loops, reduce loop overhead, and minimize branch mispredictions. Hoist invariant computations out of loops. Consider loop unrolling for tight inner loops. Batch operations when possible to amortize per-operation overhead.\n\n**SIMD and Vectorization:** Leverage SIMD instructions (SSE, AVX) for data-parallel operations when appropriate. Structure data to enable auto-vectorization by the compiler. Consider explicit SIMD intrinsics for critical hot paths like checksum computation, encoding/decoding, and bulk data processing.\n\n**Branch Prediction:** Minimize unpredictable branches in hot paths. Use `LIKELY`/`UNLIKELY` macros to hint branch prediction, e.g. for error cases and other rare or otherwise costly cases, but NOT for predicting popular configurations. Consider branchless alternatives for simple conditionals. Order switch cases and if-else chains by frequency.\n\n**Memory and Resource Management:** Be mindful of memory allocations, especially in hot paths. Use RAII patterns, smart pointers, and RocksDB's memory management utilities appropriately.\n\n**Hot Path Analysis:** When deciding how aggressively to optimize code, consider whether it's on a hot path:\n- **Hot path** (executed thousands+ times, e.g., data access, iteration, compaction loops): Performance is paramount. Apply all optimization techniques—loop collapsing, SIMD, cache optimization, pre-allocation, etc. The cost of each operation is multiplied by execution frequency.\n- **Cold path** (executed rarely, e.g., DB open, configuration parsing, error handling): Maintainability and clarity are more important. Prefer readable code over micro-optimizations. Complex optimizations here add maintenance burden with negligible performance benefit.\n- **Warm path** (moderate frequency): Balance both concerns. Use profiling data to guide optimization decisions.\n\n**Avoid Premature Optimization:** Performance is known critical in places like inner loops of compaction, read path and write path. Elsewhere, try to find a \"holy trinity\" solution of *correct, simple, and reasonably efficient*. More complex solutions are only appropriate when profiling/benchmarking data shows a measurable payoff.\n\n### API Design and Compatibility\n\n**Backwards Compatibility:** RocksDB maintains strong backwards compatibility guarantees. Breaking changes are rare and require extensive justification. When deprecating features, follow the project's deprecation policy (typically spanning multiple releases).\n\n**Behavioral Compatibility:** Behavior changes are human judgment calls that must be intentional, well-documented (including release notes), and well researched for potential downstream production impact. Agents and reviewers must call out potential gaps, ambiguity, or adverse impacts in intentionality, documentation, and production impact. For an existing accepted input—including an undocumented, discouraged, or historically ignored value—the analysis should compare old and new observable behavior, including performance and resource impact, identify known direct callers and stored configurations, and add or update regression coverage as appropriate.\n\n**API Consistency:** New APIs should be consistent with existing patterns. Use similar naming conventions, parameter ordering, and return types. Reviewers will suggest changes to improve consistency with the broader codebase.\n\n**Documentation:** Public APIs must be thoroughly documented, without unnecessary embelishment nor dwelling on implementation details nor project planning. When non-obvious, include usage examples, parameter descriptions, known bugs or limitations, notes on thread safety, performance characteristics, and compatibility considerations. Re-read comments for ambiguous terminology and phrasing, such as ambiguously re-purposed programming jargon.\n\n---\n\n## Component-Specific Guidance\n\n### Database Core (`db`)\n\nThe database core handles write-ahead logging (WAL), memtables, compaction, and recovery. This component receives the most scrutiny in code reviews.\n\n**Concurrency and Thread Safety:** Database operations are highly concurrent. Reviewers carefully examine locking strategies, atomic operations, and memory ordering. Document synchronization assumptions clearly. Use appropriate memory ordering semantics (`acquire`/`release` vs. `seq_cst`).\n\n**Compaction Logic:** Changes to compaction are complex and high-risk. Ensure that compaction logic respects configured parameters, handles edge cases (empty databases, single-file compactions), and maintains correctness under concurrent operations.\n\n**Error Propagation:** Database operations can fail in many ways (I/O errors, corruption, resource exhaustion). Ensure that errors are properly propagated, logged, and handled. Avoid assertions in production code paths.\n\n**Testing:** Database core changes require extensive testing, including unit tests, integration tests, and stress tests. Test with various configurations, compaction styles, and concurrent workloads.\n\n### Public Headers / \"Public API\" (`include/rocksdb/`)\n\nPublic headers define RocksDB's API surface. Changes here have the highest compatibility impact.\n\n**API Design:** New APIs should be intuitive, consistent with existing patterns, and well-documented. Consider how the API will be used in practice and avoid adding unnecessary complexity.\n\n**Backwards Compatibility:** Breaking changes to public APIs require extensive justification and a deprecation plan. Maintain ABI compatibility for bug fixes and patch releases.\n\n**Documentation:** Every public API must be thoroughly documented with usage examples, parameter descriptions, and notes on thread safety and performance characteristics.\n\n**Deprecation:** When deprecating APIs, follow the project's policy. Mark deprecated APIs clearly, provide migration guidance, and maintain support for at least one major release.\n\n### Internal Utilities (`util`)\n\nInternal utilities provide common functionality used throughout the codebase.\n\n**Code Reuse:** Utilities should be general-purpose and reusable. Avoid duplicating functionality that already exists elsewhere in the codebase.\n\n**Error Handling:** Utility functions should handle errors robustly and propagate them appropriately. Consider edge cases like overflow, underflow, and invalid inputs.\n\n**Testing:** Utility functions should have comprehensive test coverage, including edge cases and failure modes. Consider adding death tests for assertions.\n\n**Performance:** Utilities are often used in hot paths. Ensure that implementations are efficient and avoid unnecessary allocations or copies.\n\n### Table Management (`table`)\n\nTable management handles SST file format, block-based tables, and table readers/writers.\n\n**Block Format and Checksums:** Changes to block format require extreme care. Ensure that checksums are computed and verified correctly. Test with various compression algorithms and block sizes.\n\n**Iterator Correctness:** Table iterators are used throughout the codebase. Ensure that iterator semantics (Seek, Next, Prev) are correct, especially at boundaries and with deletions.\n\n**Caching and Prefetching:** Table readers interact with the block cache and prefetching logic. Ensure that cache keys are unique and that prefetching respects configured limits.\n\n**Performance:** Table operations are performance-critical. Benchmark changes that could impact read or write performance.\n\n### Utilities (`utilities`)\n\nUtilities include optional features like transactions, backup engine, and checkpoint.\n\n**Feature Isolation:** Utilities should be self-contained and not introduce unnecessary dependencies on core database internals.\n\n**Deprecation and Cleanup:** Legacy features are being phased out. When removing deprecated code, ensure that migration paths are documented and that users have sufficient warning.\n\n**Cross-Platform Compatibility:** Utilities often interact with OS-specific APIs. Ensure that code works on all supported platforms.\n\n### Options and Configuration (`options`)\n\nOptions define RocksDB's configuration system.\n\n**Type Safety:** Use appropriate types for options (e.g., `uint32_t` for flags, scoped enums for enumerated values).\n\n**Deprecation Policy:** When deprecating options, follow the project's policy. Document the deprecation, provide migration guidance, and maintain support for at least one major release.\n\n**Dynamic Configuration:** Some options can be changed dynamically. Ensure that dynamic changes are thread-safe and take effect correctly.\n\n**Validation:** Validate option values and provide clear error messages for invalid configurations.\n\n### Cache (`cache`)\n\nCache management is critical for RocksDB's performance.\n\n**Concurrency:** Cache operations are highly concurrent. Ensure that implementations are thread-safe and use appropriate synchronization primitives.\n\n**Performance:** Cache operations are in the hot path. Optimize for low latency and high throughput. Benchmark changes carefully.\n\n**Memory Management:** Cache implementations must manage memory carefully to avoid leaks and excessive allocations.\n\n**Eviction Policies:** Changes to eviction policies should be well-tested and benchmarked to ensure they improve overall performance.\n\n---\n\n## Code Review Checklist\n\nWhen reviewing RocksDB code (or preparing code for review), use this checklist:\n\n### Contract Boundaries\n- [ ] Is each behavior owned by the right layer? High-level policy (for example,\n  \"compaction wants this I/O mode\") should live at the caller/policy layer, while\n  lower layers should expose generic mechanisms (for example, \"open a fresh\n  reader\", \"skip shared cache insertion\", or \"use these FileOptions\").\n- [ ] Do comments and names describe local contracts rather than leaking a\n  specific caller's rationale into reusable APIs? Generic code should not need to\n  know about one current use case unless the API itself is intentionally\n  use-case-specific.\n- [ ] Does each flag or parameter control one coherent behavior? If one boolean\n  starts implying ownership, cache policy, I/O mode, prefetching, and caller\n  identity, split it into explicit flags or an options struct.\n- [ ] Could a future caller use this lower-level API without accidentally\n  inheriting assumptions from compaction, backup, user reads, or a particular\n  table format? If not, tighten the contract with assertions, clearer names, or\n  a narrower API.\n- [ ] Are implementation details not being used as policy signals? Prefer an\n  explicit contract over inferring behavior from incidental fields such as file\n  options, cache handles, or current table-reader state.\n\n### Correctness\n- [ ] Does the change preserve database semantics (e.g., snapshot isolation, key ordering)?\n- [ ] Are all error cases handled appropriately?\n- [ ] Is the change thread-safe? Are synchronization primitives used correctly?\n- [ ] Are there any potential data races or deadlocks?\n\n### Testing\n- [ ] Does the change include appropriate test coverage?\n- [ ] Are edge cases and failure modes tested?\n- [ ] Have the tests been run on all supported platforms?\n- [ ] Are stress tests passing?\n\n### Performance\n- [ ] Are there benchmark results for performance-sensitive changes?\n- [ ] Does the change avoid unnecessary allocations or copies?\n- [ ] Are hot paths optimized appropriately?\n\n### API and Compatibility\n- [ ] Is the change backwards compatible?\n- [ ] Are new APIs consistent with existing patterns?\n- [ ] Is the public API documented?\n- [ ] Are deprecated features handled according to policy?\n\n### Code Quality\n- [ ] Does the code follow RocksDB's style conventions?\n- [ ] Is the code clear and maintainable?\n- [ ] Are comments and documentation sufficient?\n- [ ] Are there any code smells or anti-patterns?\n\n---\n\n## Common Review Feedback Patterns\n\nThe following patterns emerged as frequent sources of review feedback:\n\n1. **Test Coverage:** Reviewers frequently request additional tests for edge cases, platform-specific behavior, and failure modes. Complex changes require comprehensive test coverage including unit tests, integration tests, and stress tests.\n\n2. **Error Handling:** Ensure proper error propagation using RocksDB's `Status` type. Avoid silent failures and provide clear error messages that include context about what failed and why.\n\n3. **API Design:** New APIs should be consistent with existing patterns. Use descriptive names that follow established conventions. Avoid breaking changes without strong justification and a clear deprecation plan.\n\n4. **Documentation:** Public APIs must be documented with usage examples and notes on thread safety, performance characteristics, and compatibility considerations. Complex internal logic should also be well-commented.\n\n5. **Performance:** Performance-sensitive changes require benchmark results to validate improvements. Use `db_bench` and other profiling tools to measure impact. Avoid premature optimization that adds complexity without measurable benefit.\n\n6. **Concurrency:** Thread safety is critical in RocksDB. Document synchronization assumptions clearly. Use appropriate memory ordering semantics. Consider potential race conditions and deadlocks.\n\n7. **Code Style:** Follow existing conventions for naming, formatting, and structure. Use `.clang-format` for consistent formatting. Prefer scoped enums (`enum class`) over unscoped enums.\n\n8. **Backwards Compatibility:** RocksDB maintains strong compatibility guarantees. Breaking changes require extensive justification. When deprecating features, provide migration guidance and maintain support across multiple releases.\n\n9. **Refactoring:** Reviewers appreciate refactoring that improves code readability and maintainability. Look for opportunities to deduplicate code and simplify complex logic.\n\n10. **Platform Compatibility:** Ensure changes work correctly on all supported platforms (Linux, Windows, macOS) and with all supported compilers (GCC, Clang, MSVC).\n\n11. **Contract Boundary Leaks:** When a change plumbs a new option or use-case\nspecific behavior through multiple subsystems, review the call chain for\ncontract leaks. Caller-specific rationale belongs at the call site or public API\ndocumentation; reusable layers should expose precise, layer-local capabilities.\nWatch especially for comments mentioning one caller in generic code, booleans\nthat silently bundle several behaviors, and downstream code inferring policy\nfrom an implementation detail instead of an explicit option.\n\n---\n\n## Important tips\n\n### Pull request and diff summaries\n* Before writing or updating an external RocksDB pull request summary or its\n  corresponding internal Phabricator diff summary, read and follow\n  `claude_md/pull_request_summary_guideline.md`.\n\n### Build system\n* There are 3 build system. Make for git clones, BUCK (meta internal) for hg\n  clones, and CMake for some special cases.\n* When a new .cc file is added, update Makefile, CMakeLists.txt, src.mk, BUCK.\n* Don't manually edit BUCK file, after updating src.mk, run\n    /usr/local/bin/python3 buckifier/buckify_rocksdb.py to update it\n* For -j in make command, use the number of CPU cores to decide it.\n* When searching for references to something (a symbol, library, etc.), do not\n  restrict or truncate your search based on presumed relevance or scope. It is\n  important and time-saving to keep the repo reasonably consistent across\n  different build systems, programming languages, and even between\n  documentation and implementation.\n\n### Avoiding mixed build modes with Make (use `AUTO_CLEAN=1`)\n\nObject files are written to the same paths regardless of build flags, so\nreusing objects from a prior build with different flags causes confusing\nlinker errors, etc. This problem is essentially avoidable by ALWAYS using\n`AUTO_CLEAN=1 make -j<n> <something>` for manual make invocations. This\nwill automatically clean object files if the build parameters/flavor have\nchanged. The `build_tools/rockstest.sh` / `rocksptest.sh` helpers described\nbelow set `AUTO_CLEAN=1` for you.\n\n`AUTO_CLEAN=1` does not fix Make failures associated with stale .d files\nreferring to removed files. Resolve that manually or with `make clean`\nwithout complaining to the user.\n\n### Source checks\n* Run `make check-sources` before committing. This catches non-ASCII\n    characters in source files and other source-level issues that CI will\n    reject. In particular, **do not use Unicode characters** (em dashes,\n    smart quotes, etc.) in comments or strings -- use ASCII equivalents\n    (`--` instead of em dash, `'` instead of smart quote, etc.).\n\n### License headers\n* Every new source file needs a license header. For a file that does **not**\n    carry an outside/third-party copyright, use the standard Meta dual-licensed\n    header (the dual-license designation is required -- a bare\n    \"All Rights Reserved\" copyright is not an acceptable open-source header):\n    ```\n    //  Copyright (c) Meta Platforms, Inc. and affiliates.\n    //  This source code is licensed under both the GPLv2 (found in the\n    //  COPYING file in the root directory) and Apache 2.0 License\n    //  (found in the LICENSE.Apache file in the root directory).\n    ```\n    Use a `#` comment prefix instead of `//` for shell, Python, and Makefile\n    fragments.\n* Files derived from an external source (e.g. LevelDB) keep their original\n    upstream copyright line in addition to the header above.\n\n### RTTI and dynamic_cast\n* Production code and `db_stress` must build in **release mode\n    (`-fno-rtti`)**. Do not use `dynamic_cast` anywhere except unit tests.\n    Use `static_cast_with_check` from `util/cast_util.h` (validates with\n    `dynamic_cast` in debug builds, plain `static_cast` in release).\n* Unit tests (`*_test.cc`) are built in debug mode with RTTI enabled.\n\n### Cross-platform / portability\nLocal `make` only exercises Linux with GCC/Clang, but CI\n(`.github/workflows/pr-jobs.yml` and `nightly.yml`) gates on a much wider\nmatrix, so portability breaks are invisible locally until CI fails. Code must\nbuild (and where noted, run tests) across:\n\n| Axis | Must support |\n|------|--------------|\n| OS | Linux (x86_64 + ARM), macOS, Windows |\n| Architecture | Little-endian and big-endian targets, including Linux on s390x |\n| Compiler | GCC, Clang (libstdc++ **and** libc++), AppleClang, **MSVC (VS2022)**, MinGW (Linux cross-compile, build-only, no gflags) |\n| Build system | Make, CMake, and BUCK (internal) -- keep all in sync (see \"Build system\" above) |\n| Config | release (`-fno-rtti`), `ASSERT_STATUS_CHECKED`, ASAN/UBSAN/TSAN, folly, unity build, JNI/Java |\n\nTreat these as constraints to satisfy and infer the specifics from them before\nadding any system header, libc call, or compiler-specific construct. The most\ncommon trap: anything that compiles under GCC/Clang on Linux but not under\n**MSVC/MinGW** -- e.g. unguarded POSIX-only headers/functions (`<unistd.h>`,\n`<sys/*.h>`, `getpid`, `_exit`, ...) or GCC/Clang extensions\n(`__attribute__`, `__builtin_*`, VLAs, `alloca`). Prefer the `port::`/`Env`\nabstractions; otherwise guard with `#ifdef OS_WIN` (POSIX `<unistd.h>` ->\nWindows `<process.h>`). Because libc++ is also tested, include what you use\nrather than relying on libstdc++ transitive includes.\n\nDo not use `static_assert` to reject a supported architecture for an optional\nfeature. Check an existing `port::` capability such as `port::kLittleEndian`\nand disable only the unsupported feature so the rest of RocksDB still builds.\nUse a portable representation when the feature itself must work across\narchitectures.\n\n### Unit Test\n* After all of the unit tests are added, review them and try to extract common\n    reusable utility functions to reduce code duplication due to copy past between\n    unit tests. This should be done every time unit test is updated.\n* Don't use sleep to wait for certain events to happen. This will cause test to\n    be flaky. Instead, use sync point to synchronize thread progress.\n* Cap unit test execution with 60 seconds timeout.\n* To build and run unit tests locally, prefer these helper scripts:\n    * `build_tools/rocksptest.sh <test_binary> [more_binaries...] [args...]`\n        builds the binary(ies) with parallel make and `AUTO_CLEAN=1` and runs\n        them under gtest-parallel, sharding the test cases across CPUs. Prefer\n        this whenever running more than a couple of test cases, e.g.\n        `build_tools/rocksptest.sh table_test` or\n        `build_tools/rocksptest.sh db_test env_test --gtest_filter=*Foo*`.\n    * `build_tools/rockstest.sh <test_binary> [args...]` builds with parallel\n        make and `AUTO_CLEAN=1` and runs the binary directly (serially).\n        Use it only for a very small number of test cases, e.g.\n        `build_tools/rockstest.sh db_test --gtest_filter=*MixedSlowdown*`.\n* After writing a test, stress-test for flakiness (AUTO_CLEAN handles the\n    rebuild needed by the `COERCE_CONTEXT_SWITCH=1` flag change):\n    ```bash\n    COERCE_CONTEXT_SWITCH=1 build_tools/rockstest.sh {test_binary} -r100 \\\n        --gtest_filter=\"*YourTestName*\"\n    ```\n* For CI-style flaky tests that do not reproduce with `gtest_parallel.py`,\n    `--gtest_repeat`, or normal coerce-mode runs, inspect\n    `tools/gtest_parallel_repro.py --help`.\n* Each unit test file has overheads, so avoid creating new unit test files\n  for random minor features. Consider adding to slice_test, db_etc3_test, or\n  others.\n\n### Unit test dedup guidelines\n* Extract helper functions for repeated patterns such as object\n    construction, round-trip (encode → decode → verify), and common\n    assertion sequences.\n* Use table-driven tests (struct array + loop) when multiple test cases\n    share the same logic but differ only in input/expected data.\n* Prefer randomized tests over exhaustive parameter permutations. Use\n    `Random` from `util/random.h` (not `std::mt19937`). Use a time-based\n    seed with `SCOPED_TRACE(\"seed=\" + std::to_string(seed))` so failures\n    are reproducible.\n* Keep deterministic edge-case tests separate from randomized tests\n    (error paths, boundary conditions, format verification).\n* Methods only used in tests should be private with `friend class` +\n    `TEST_F` fixture wrappers. In wrappers, always fully qualify the\n    target method to avoid infinite recursion.\n\n### Adding new public API\n    Refer to claude_md/add_public_api.md\n\n### Changing existing public API behavior\n    Follow the Behavioral Compatibility requirements above.\n\n### Adding new option\n    Refer to claude_md/add_option.md\n\n### Removing deprecated option\n    Refer to claude_md/remove_option.md\n\n### Metrics\n* When adding a new feature, evaluate whether there is opportunity to add\n    metrics. Try to avoid causing performance regression on hot path when adding\n    metrics.\n\n### Stress test\n* When adding a new feature, make sure stress test covers the new option.\n\n### Component docs\n* For component-level design notes and implementation walkthroughs, start with\n    `docs/components/index.md`.\n* Documentation under `docs/components/` is organized by subsystem in\n    `docs/components/<area>/`.\n* Each subsystem directory should have an `index.md` entry point plus focused\n    chapter files for deeper topics.\n\n### DB bench update\n* When adding a performance related feature, support it in db_bench\n\n### Adding release note\n* Release note should be kept short at high level for external user consumption.\n    Release notes identify what users might care about most in a release. They\n    are not exhaustive and are not a guide. PLEASE learn from past agents who\n    tried to build elaborate release notes with implementation details and\n    elsewhere-documented nuance. That wastes time. Fight the bias that\n    \"my change\" is important so must be worthy of release note mention.\n* If more than single markdown line, consider how their formatting will be\n    integrated into HISTORY.md.\n\n### Blog posts (docs/_posts)\n* Blog post authors must be defined in `docs/_data/authors.yml` to be displayed\n\n### Final verification of the change\n* Execute `AUTO_CLEAN=1 make check` to build all of the changes and execute all\n    of the tests. `AUTO_CLEAN=1` ensures a clean rebuild if your previous build\n    used different parameters. Note that executing all of the tests could take\n    multiple minutes.\n* Run `AUTO_CLEAN=1 ASSERT_STATUS_CHECKED=1 make check` to verify all Status\n    objects are properly checked. This catches missing error handling that can\n    lead to silent data corruption. Merely building with ASSERT_STATUS_CHECKED=1\n    accomplishes nothing; it enables a runtime check. New unit tests missing\n    Status checks is a common failure point, even from agents.\n\n### Monitoring make check progress\n* Use `make check-progress` to get machine-parseable JSON progress while\n    `make check` is running. This is useful for Claude Code to monitor long\n    builds without timeout issues.\n* Run `make check` in background, then poll progress:\n    ```bash\n    AUTO_CLEAN=1 make check &\n    # Poll periodically:\n    make check-progress\n    ```\n* The output shows current phase and progress:\n    ```json\n    {\"status\":\"running\",\"phase\":\"compiling\",\"completed\":300,\"total\":919,...}\n    {\"status\":\"running\",\"phase\":\"testing\",\"completed\":1500,\"total\":29962,\"failed\":0,\"percent\":5,...}\n    {\"status\":\"completed\",\"phase\":\"testing\",\"completed\":29962,\"total\":29962,\"failed\":0,\"percent\":100,...}\n    ```\n* Phases: `compiling` -> `linking` -> `generating` -> `testing` -> `completed`\n* Key fields: `status`, `phase`, `completed`, `total`, `failed`, `percent`\n* When tests fail, `failed_tests` array shows details (up to 10 failures):\n    ```json\n    {\"status\":\"running\",...,\"failed\":3,\"failed_tests\":[\n      {\"test\":\"cache_test-CacheTest.Usage\",\"exit_code\":1,\"signal\":0,\"output\":\"...test log...\"},\n      {\"test\":\"env_test-EnvTest.Open\",\"exit_code\":0,\"signal\":11,\"output\":\"...Segmentation fault...\"}\n    ]}\n    ```\n* `exit_code`: non-zero means test assertion failed\n* `signal`: non-zero means test was killed (e.g., 9=SIGKILL, 6=SIGABRT, 11=SIGSEGV)\n* `output`: last 50 lines of test log including error messages and stack traces\n\n### Executing benchmark using db_bench\n* Since the goal is to measure performance, we need to build a release binary\n    using `AUTO_CLEAN=1 DEBUG_LEVEL=0 make db_bench`. If there is an engine\n    crash due to a bug, switch back to a debug build with\n    `AUTO_CLEAN=1 make dbg`; `AUTO_CLEAN=1` handles the release<->debug rebuild\n    automatically.\n\n### Formatting code\n* After making change, use `make format-auto` to auto-apply formatting without\n    interactive prompts (Claude Code friendly).\n","isInternal":false,"tokens":6321,"sizeBytes":30771},{"name":"README.md","path":"tools/advisor/README.md","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/advisor/README.md","title":"advisor Documentation","category":"plugin-manifest","format":"markdown","content":"# Rocksdb Tuning Advisor\n\n## Motivation\n\nThe performance of Rocksdb is contingent on its tuning. However,\nbecause of the complexity of its underlying technology and a large number of\nconfigurable parameters, a good configuration is sometimes hard to obtain. The aim of\nthe python command-line tool, Rocksdb Advisor, is to automate the process of\nsuggesting improvements in the configuration based on advice from Rocksdb\nexperts.\n\n## Overview\n\nExperts share their wisdom as rules comprising of conditions and suggestions in the INI format (refer\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\nUsers provide the Rocksdb configuration that they want to improve upon (as the\nfamiliar Rocksdb OPTIONS file —\n[example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini))\nand the path of the file which contains Rocksdb logs and statistics.\nThe [Advisor](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser_example.py)\ncreates appropriate DataSource objects (for Rocksdb\n[logs](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_log_parser.py),\n[options](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_options_parser.py),\n[statistics](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_stats_fetcher.py) etc.)\nand provides them to the [Rules Engine](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser.py).\nThe Rules uses rules from experts to parse data-sources and trigger appropriate rules.\nThe Advisor's output gives information about which rules were triggered,\nwhy they were triggered and what each of them suggests. Each suggestion\nprovided by a triggered rule advises some action on a Rocksdb\nconfiguration option, for example, increase CFOptions.write_buffer_size,\nset bloom_bits to 2 etc.\n\n## Usage\n\n### Prerequisites\nThe tool needs the following to run:\n* python3\n\n### Running the tool\nAn example command to run the tool:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --rules_spec=advisor/rules.ini --rocksdb_options=test/input_files/OPTIONS-000005 --log_files_path_prefix=test/input_files/LOG-0 --stats_dump_period_sec=20\n```\n\n### Command-line arguments\n\nMost important amongst all the input that the Advisor needs, are the rules\nspec and starting Rocksdb configuration. The configuration is provided as the\nfamiliar Rocksdb Options file (refer [example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini)).\nThe Rules spec is written in the INI format (more details in\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\n\nIn brief, a Rule is made of conditions and is triggered when all its\nconstituent conditions are triggered. When triggered, a Rule suggests changes\n(increase/decrease/set to a suggested value) to certain Rocksdb options that\naim to improve Rocksdb performance. Every Condition has a 'source' i.e.\nthe data source that would be checked for triggering that condition.\nFor example, a log Condition (with 'source=LOG') is triggered if a particular\n'regex' is found in the Rocksdb LOG files. As of now the Rules Engine\nsupports 3 types of Conditions (and consequently data-sources):\nLOG, OPTIONS, TIME_SERIES. The TIME_SERIES data can be sourced from the\nRocksdb [statistics](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/statistics.h)\nor [perf context](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/perf_context.h).\n\nFor more information about the remaining command-line arguments, run:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --help\n```\n\n### Sample output\n\nHere, a Rocksdb log-based rule has been triggered:\n\n```shell\nRule: stall-too-many-memtables\nLogCondition: stall-too-many-memtables regex: Stopping writes because we have \\d+ immutable memtables \\(waiting for flush\\), max_write_buffer_number is set to \\d+\nSuggestion: inc-bg-flush option : DBOptions.max_background_flushes action : increase suggested_values : ['2']\nSuggestion: inc-write-buffer option : CFOptions.max_write_buffer_number action : increase\nscope: col_fam:\n{'default'}\n```\n\n## Running the tests\n\nTests for the code have been added to the\n[test/](https://github.com/facebook/rocksdb/tree/main/tools/advisor/test)\ndirectory. For example, to run the unit tests for db_log_parser.py:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m unittest -v test.test_db_log_parser\n```\n","isInternal":false,"tokens":1039,"sizeBytes":4537},{"name":"README.md","path":"tools/c_api_gen/README.md","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/c_api_gen/README.md","title":"c_api_gen Documentation","category":"plugin-manifest","format":"markdown","content":"# RocksDB C API Code Generation Prototype\n\nThis directory contains a **prototype** for semi-automating parts of\nRocksDB's C API based on the existing C++ public API and the current C API\nconventions in `include/rocksdb/c.h` / `db/c.cc`.\n\nThe intent is **not** to automatically wrap arbitrary C++ APIs. Instead, the\ngoal is to reduce maintenance burden for the parts of the C API that are\nalready highly mechanical today.\n\n## Why a semi-automated approach\n\nRocksDB's C API follows stable conventions that downstream users rely on:\n\n- opaque handle types like `rocksdb_t*`, `rocksdb_transaction_t*`\n- `Status` translated to `char** errptr`\n- `Slice` translated to `const char*` + `size_t`\n- binary/string results copied into `malloc()`-owned buffers\n- booleans represented as `unsigned char`\n- `rocksdb_<object>_<verb>[_cf][_with_ts]` naming\n\nThese conventions are valuable and should remain the source of truth for the\ngenerated code.\n\nAt the same time, the C++ public API includes features that are poor fits for\nfully automatic wrapper generation:\n\n- callback-backed polymorphic types (`Comparator`, `MergeOperator`, etc.)\n- complex object construction/open flows\n- ownership-transferring factory setters\n- vector-heavy marshalling APIs like the `MultiGet` family\n- virtual extension points and custom bridging logic\n\nFor those cases, hand-designed wrappers remain the right tool.\n\n## Why the spec-driven generator still exists\n\nThe spec-driven generator is still needed for wrappers whose C shape cannot be\nreliably inferred from the C++ declaration alone.\n\nYes, this means `spec.json` is manually maintained. That is intentional. The\ngoal is not to eliminate human decisions; the goal is to stop hand-writing the\nsame declaration/definition boilerplate once those decisions have been made.\n\nFor many wrappers, someone still has to decide:\n\n- the C function name and parameter order\n- whether a C++ `Status` becomes `char** errptr`\n- whether default C++ objects should be synthesized, such as `ReadOptions()`\n- how ownership and lifetime should work for pointers, factories, and callbacks\n- how vectors, maps, and option collections should be flattened into C\n- whether the C API should intentionally differ from the C++ API shape\n\nThose are API design choices, not mechanical translations. The spec-driven\npath keeps those choices explicit while still generating consistent boilerplate.\n\nBackward compatibility with the existing hand-written C API is one input, but\nit is not the primary reason this layer exists. Even for brand-new wrappers, we\nstill need an explicit policy layer for non-trivial C bindings.\n\n## What this prototype focuses on\n\nThe generator currently targets representative examples from the easiest and\nmost repetitive wrapper families:\n\n1. **Simple scalar field setters/getters**\n   - `rocksdb_options_set_create_if_missing`\n   - `rocksdb_options_get_create_if_missing`\n   - `rocksdb_readoptions_set_fill_cache`\n   - `rocksdb_writeoptions_set_sync`\n   - `rocksdb_block_based_options_set_block_size`\n   - `rocksdb_cuckoo_options_set_hash_ratio`\n\n2. **Simple forwarding wrappers with no `Status`**\n   - `rocksdb_writebatch_clear`\n   - `rocksdb_writebatch_put`\n   - `rocksdb_writebatch_put_cf`\n   - `rocksdb_writebatch_delete`\n   - `rocksdb_writebatch_put_log_data`\n   - `rocksdb_writebatch_set_save_point`\n   - `rocksdb_transaction_set_savepoint`\n\n3. **Simple forwarding wrappers with `Status` -> `char** errptr`**\n   - `rocksdb_put`, `rocksdb_put_cf`\n   - `rocksdb_delete`, `rocksdb_delete_cf`\n   - `rocksdb_merge`, `rocksdb_merge_cf`\n   - `rocksdb_write`\n   - `rocksdb_writebatch_rollback_to_save_point`\n   - `rocksdb_writebatch_pop_save_point`\n   - `rocksdb_transaction_put`, `rocksdb_transaction_put_cf`\n   - `rocksdb_transaction_merge`, `rocksdb_transaction_merge_cf`\n   - `rocksdb_transaction_delete`, `rocksdb_transaction_delete_cf`\n   - `rocksdb_transaction_commit`\n   - `rocksdb_transaction_rollback`\n   - `rocksdb_transaction_rollback_to_savepoint`\n\n4. **Simple metadata accessors**\n   - `rocksdb_flushjobinfo_cf_name`\n   - `rocksdb_flushjobinfo_largest_seqno`\n\nThis is intentionally a constrained subset. The point is to demonstrate a\nmaintainable pattern and a spec format that can be extended gradually.\n\n## What should remain manual\n\nThese families should stay hand-written unless a future design adds a much\nricher generator:\n\n- comparators / merge operators / compaction filters / event listeners\n- compaction service wrappers\n- openers and constructors that build vectors/maps of descriptors/options\n- `MultiGet` / batched `MultiGet` families\n- wrappers involving `std::shared_ptr` / `std::unique_ptr` ownership transfer\n- C APIs whose behavior intentionally differs from the C++ API shape\n\n## Design principles\n\n### 1. Keep the current C API conventions\n\nThe code generator should not invent a new style. It should emit code that\nlooks like today's hand-written wrappers:\n\n- `SaveError(errptr, ...)`\n- `Slice(key, keylen)`\n- direct field assignments for plain option setters\n- same function names and signatures\n\n### 2. Let auto-discovery handle the simple direct cases\n\nFor a small set of mechanically mappable public structs, the generator can\ndiscover missing bindings directly from the C++ headers and emit the missing C\nwrappers automatically. Existing handwritten wrappers still win when they\nalready exist.\n\nToday this strict auto-discovery path is used for:\n\n- simple `ReadOptions` scalar / enum fields\n- simple scalar / enum fields across selected public option structs\n- simple metadata fields on listener/job-info structs\n- simple metadata view structs such as table-properties and compaction metadata\n\nFor those managed families, unsupported or intentionally deferred fields must\nbe explicitly recorded in `auto_simple_bindings_blocklist.json` rather than\nbeing skipped silently. Anything outside those families remains hand-written.\n\n### 3. Keep explicit spec for non-trivial wrappers\n\nThe spec-driven generator remains the right tool for method-style wrappers and\nother APIs whose C surface requires an explicit design decision. In practice:\n\n- auto-discovery owns simple direct field coverage for selected struct families\n- `spec.json` owns wrappers that are still manual in design but repetitive in\n  implementation\n- fully irregular ownership-heavy or callback-heavy APIs remain hand-written\n\n### 4. Let C++ headers guide validation, not policy\n\nLonger term, Clang/libTooling can help validate that a wrapper spec still\nmatches the underlying C++ method signature. But the C naming, ownership, and\nerror-handling policy should remain explicit in the spec.\n\n## Files\n\nSource templates (hand-written; NOT user-includable and NOT compiled directly):\n\n- `c_base.h`\n  - hand-written template for `include/rocksdb/c.h`; the generated `.h.inc`\n    fragments are inlined into it to produce the self-contained public header\n- `c_base.cc`\n  - hand-written template for `db/c.cc`; the generated `.cc.inc` fragments are\n    inlined into it to produce the compiled implementation\n\nGenerators and inputs:\n\n- `spec.json`\n  - declarative input for the spec-driven generator\n- `generate_c_api.py`\n  - emits header/source fragments from the spec\n- `auto_simple_bindings.py`\n  - auto-discovers simple public field bindings and generates checked-in\n    `.inc` files for them\n- `auto_simple_bindings_blocklist.json`\n  - checked-in exceptions for auto-managed fields that are intentionally manual\n    or temporarily deferred\n- `abi_type_overrides.json`\n  - per-function C type pins so already-shipped wrappers keep their historical\n    C signature even when the C++ field type maps to a different C type\n- `regen_all.py`\n  - orchestrates both generators and inlines the fragments into `c.h` / `c.cc`\n\nVerification (run by `make check-c-api-gen` and in CI):\n\n- `check_api_completeness.py`\n  - asserts every declared public C function has exactly one definition\n    (dependency-free; guards against link-time breakage of bindings)\n- `check_api_compatibility.py` + `api_compatibility_allowlist.json`\n  - signature-level backward-compatibility gate against a reference revision;\n    the authoritative ABI/API-stability check\n- `verify_generated_up_to_date.py`\n  - regenerates in a temp dir and confirms the checked-in output is current\n- `validate_generated_equivalence.py` + `equivalence_allowlist.json`\n  - best-effort migration aid: compares generated wrapper *bodies* against a\n    PRE-migration hand-written revision. Body comparison is heuristic; for\n    backward-compatibility rely on `check_api_compatibility.py`.\n\n## Toolchain requirements\n\nRegeneration needs two external tools:\n\n- **`clang++`** (libclang) — used to dump the C++ struct ASTs that drive\n  auto-discovery. Resolution order is `$CXX` (if it names a clang), then bare\n  `clang++`, then versioned fallbacks (`clang++-21` … `clang++-13`).\n- **`clang-format`** — used to canonicalize the generated `.inc` fragments (and\n  therefore the inlined `c.h` / `c.cc`).\n\nThe checked-in generated output is byte-reproducible only for a **pinned\nclang-format version**. CI uses **clang-format-21** (see\n`.github/workflows/pr-jobs.yml`); pin the same version locally so your\nregeneration matches CI:\n\n```bash\npython3 tools/c_api_gen/regen_all.py --clang-format clang-format-21\n# or, when running the staleness check via make:\nmake check-c-api-gen CLANG_FORMAT_BINARY=clang-format-21\n```\n\nIf `clang++` is not installed, `make check` skips the C API staleness check\nwith a message instead of failing, so it still works without the codegen\ntoolchain. CI is the authoritative gate.\n\nThe dedicated `build-linux-clang-21-no_test_run` CI job runs this target with\n`CHECK_C_API_GEN_STRICT=1`, which turns every such \"skip\" (missing `clang++` or\nclang-format, or an unresolvable compat baseline ref) into a hard error, so the\ncore CI coverage cannot silently regress to a no-op:\n\n```bash\nmake check-c-api-gen CHECK_C_API_GEN_STRICT=1 CLANG_FORMAT_BINARY=clang-format-21\n```\n\n## Running the generators\n\nFrom the repo root, to regenerate all checked-in fragments and the inlined\n`c.h` / `c.cc`:\n\n```bash\npython3 tools/c_api_gen/regen_all.py\n```\n\nThis regenerates:\n\n- the spec-driven fragments from `spec.json`\n- the auto-discovered fragments produced by `auto_simple_bindings.py`\n- the round-trip tests produced by `gen_roundtrip_tests.py`\n\nTo preview only the spec-driven output for one section without touching the\nchecked-in fragments, run `generate_c_api.py` directly with `--header-out` /\n`--source-out` pointing at a scratch path (e.g. under `/tmp`).\n\nTo verify the auto-discovered checked-in output is up to date:\n\n```bash\npython3 tools/c_api_gen/auto_simple_bindings.py --check\n```\n\nTo verify the full checked-in generated set is stable without relying on Git\nworktree metadata:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\n## Maintaining Auto-Managed Families\n\nWhen a new public field is added to an auto-managed family, use this decision\nprocess:\n\n1. If it is a simple scalar, enum, string, or supported chrono field and the\n   desired C API shape matches the existing conventions, do not hand-edit\n   `include/rocksdb/c.h` or `db/c.cc`. Run `python3 tools/c_api_gen/regen_all.py`\n   and let `auto_simple_bindings.py` generate the wrapper.\n2. If the field needs an explicit C API design because of ownership, callbacks,\n   vectors, maps, nested structs, or intentionally different C naming/behavior,\n   keep it out of auto-generation by adding an entry to\n   `tools/c_api_gen/auto_simple_bindings_blocklist.json` with\n   `\"policy\": \"manual\"`.\n3. If the field belongs to an auto-managed family but you intentionally want to\n   postpone C API coverage for a short time, add a blocklist entry with\n   `\"policy\": \"deferred\"` and a concrete reason. Include `tracking_issue` when\n   you have one.\n4. If none of the above applies, the build should fail. Extend\n   `auto_simple_bindings.py`, add a spec-driven wrapper, or add a hand-written\n   wrapper and then update the blocklist policy accordingly.\n\nThe blocklist is intentionally strict:\n\n- each entry must identify the managed family and field\n- each entry must have a non-empty reason\n- policy must be either `manual` or `deferred`\n- stale entries fail regeneration if the field disappears or is renamed\n\nExample deferred entry:\n\n```json\n{\n  \"name\": \"ReadOptions\",\n  \"entries\": [\n    {\n      \"field\": \"future_slice_option\",\n      \"policy\": \"deferred\",\n      \"reason\": \"Needs an explicit C buffer ownership design before exposing it.\",\n      \"tracking_issue\": \"T123456789\"\n    }\n  ]\n}\n```\n\nThe blocklist only applies to the auto-managed families handled by\n`auto_simple_bindings.py`. It is not a substitute for `spec.json`, which still\nowns non-trivial method-style wrappers. It is also unrelated to\n`equivalence_allowlist.json`, which only suppresses intentional diff mismatches\nin the equivalence checker.\n\nTo refresh the full checked-in generated set and confirm nothing changes:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\nTo verify active generated wrappers are equivalent to the handwritten wrappers\nfrom a reference revision:\n\n```bash\npython3 tools/c_api_gen/validate_generated_equivalence.py --ref HEAD\n```\n\nThis checks the generated fragments currently included by\n`include/rocksdb/c.h` and `db/c.cc` against `HEAD:include/rocksdb/c.h` and\n`HEAD:db/c.cc`. Known historical inconsistencies can be documented in\n`equivalence_allowlist.json` with a reason instead of being silently ignored.\n\n## Suggested migration path\n\n1. Start with generated preview fragments only.\n2. Migrate a few low-risk existing wrappers to generated sections.\n3. Keep manual and generated sections clearly separated.\n4. Let auto-discovery pick up new simple public fields automatically.\n5. Extend the spec or keep manual wrappers for complex/manual families.\n\nThis incremental approach minimizes downstream impact while still reducing\nmaintenance burden over time.\n","isInternal":false,"tokens":3217,"sizeBytes":13937},{"name":"README.md","path":"tools/cpu_corruption_injector/README.md","rawUrl":"https://raw.githubusercontent.com/facebook/rocksdb/HEAD/tools/cpu_corruption_injector/README.md","title":"cpu_corruption_injector Documentation","category":"plugin-manifest","format":"markdown","content":"# CPU Corruption Injector\n\n## Overview\n\nThis tool measures the **outcome distribution** over many `db_stress` test runs.\nIn each `db_stress` test run, a single CPU-register bit-flip is injected into\nexactly one `db_stress` operation (a write, flush, or compaction) running under\n`gdb`. Aggregating over many such runs answers \"when the CPU corrupts one\ninstruction inside that op, how often does RocksDB catch it, crash, silently\nlose/return wrong data, or absorb it with no effect?\".\n\nIt has three layers:\n\n- **Detection** (`db_stress --verify_cpu_corruption_dir`): right after the\n  injected op, `db_stress` reads the whole keyspace back and compares against its\n  expected state, writing any finding to a `data_corruption.*.json` file.\n- **Injection** (`injector*.py`): runs inside `gdb`, navigates to a randomly\n  chosen instance of the op, stops at a random \"critical\" instruction -- one of\n  the two kinds that can carry a fault into data: a **move** carrying a value\n  between CPU and memory (a general-purpose or vector register), or a\n  **branch/jump** (the `eflags` register) -- and flips one random bit in the\n  register it uses. Control registers (`rsp`/`rbp`/`rip`/segment) are left alone.\n- **Orchestration** (`runner*.py`): builds the run set, launches `gdb` per run,\n  classifies each outcome, and aggregates them.\n\n## Requirements\n\n- A `db_stress` binary built with debug info and no inlining, so `gdb` can set\n  breakpoints on the injection-site functions and read their source lines:\n\n  ```bash\n  make DEBUG_LEVEL=0 EXTRA_CXXFLAGS=\"-g -fno-inline\" db_stress\n  ```\n\n- `gdb`. Defaults to `/usr/bin/gdb`; override with the `ICC_GDB` env var if the\n  telemetry's source resolves to `@ ?:0` (a `gdb` too old to read this build's\n  debug info).\n- Optional per-run timeout via the `ICC_RUN_TIMEOUT` env var (seconds, default\n  `600`). One hung `gdb`+`db_stress` cannot block the rest of the set.\n\n## Entry point: `runner.py`\n\nA **campaign** is many `db_stress` test **runs** of one op type. Each run is a\nfull single-threaded `db_stress` test that performs `ops_per_thread` ops, but the\ninjector corrupts exactly **one** op instance of the chosen type in that run\n(e.g. the 51st Put of that run); the run is then classified into a single outcome\nbucket.\n\n- `--op` is one of `write`, `flush`, `compaction`.\n- `--parallel N` runs `N` runs at once (each `db_stress` run is itself\n  single-threaded, so raise this to use more cores).\n- `--seed N` sets the campaign's `base_seed`: run `i` deterministically uses seed\n  `N+i`, which drives both the injection choices and `db_stress`'s own `--seed`, so\n  the whole set is reproducible from `base_seed` alone. Omit `--seed` to draw one\n  fresh random `base_seed` per campaign (chosen once per `runner.py` run and logged as `base_seed=N`); pass that `N` back via `--seed`\n  to replay the set, or `--seed=<N+i>` with `--runs 1` to replay just run `i`.\n\nIn the examples below, `<db_stress>` is the path to the `db_stress` binary you\nbuilt (see [Requirements](#requirements) above -- e.g. `./db_stress`), and\n`<dir>` is a writable directory for the campaign's output.\n\n```bash\n# a compaction campaign of 100 runs\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir>\n\n# a flush campaign of 200 runs, 8 in parallel\npython3 tools/cpu_corruption_injector/runner.py --op flush --runs 200 \\\n    --stress_cmd <db_stress> --report_dir <dir> --parallel 8\n\n# replay an earlier campaign: pass its logged base_seed back as --seed\n# (the runner prints \"reproduce with --seed=<base_seed>\"); base_seed is in [1, 4294967295]\npython3 tools/cpu_corruption_injector/runner.py --op write --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir> --seed 3141592653\n```\n\nBefore doing any work, `runner.py` preflights the build: it confirms `gdb` can\nset breakpoints on the op's injection-site functions and read their source\nlines, and fails fast otherwise.\n\n## Outputs\n\nEverything lands under `--report_dir`: two campaign-wide files at the top level,\nplus one `run_XXXXX/` subdirectory per run.\n\n```text\n<report_dir>/\n├── summary.json          # campaign-wide: outcome_counts + a record per run\n├── runner.log            # campaign-wide: runner logging (also echoed to console)\n├── run_00000/            # one subdirectory per run\n│   ├── inject.json                 # what the injector did (WHERE / WHAT / HOW)\n│   ├── data_corruption.<tid>.json  # the finding, only if this run flagged an SDC/corruption\n│   ├── gdb.log                     # this run's gdb output\n│   ├── db/                         # this run's db_stress DB (working dir)\n│   └── exp/                        # this run's expected-values (working dir)\n├── run_00001/\n│   └── ...\n└── ...\n```\n\nSo `summary.json` and `runner.log` are at the top of `--report_dir`; the\nper-run `gdb.log` / `inject.json` / `data_corruption.*.json` live inside each\n`run_XXXXX/`.\n\nOutcome buckets:\n\n- **SDC**: silent data corruption -- the read-back succeeded but returned the\n  wrong result (a lost key, a resurrected key, or a wrong value).\n- **CORRUPTION**: `db_stress` detected a corruption via an integrity check\n  (`Status::Corruption`).\n- **CRASH**: the injected corruption crashed `db_stress` (a fatal signal).\n- **NO_EFFECT**: the corruption landed but the run finished with correct data.\n- **NO_INJECTION**: no bit was flipped this run. The op instance, its\n  `target_fn`, and the instruction to corrupt are all picked **randomly** up\n  front, so a run can occasionally target something it never reaches -- a random\n  op instance beyond the ops this run actually performed, or a\n  critical-instruction index that no later `target_fn` call happens to have.\n  Should be rare; a high count means the injection sites (or the random ranges)\n  need revisiting.\n- **ERROR**: a harness/framework failure, **not** a `db_stress` data outcome --\n  the injector hit a bug, `gdb` died before writing `inject.json`, or the run hit\n  the `ICC_RUN_TIMEOUT` cap. Expected to be **0**; any non-zero count is a\n  framework bug worth investigating.\n\n## Reading a run's output across the 3 layers\n\nEach run threads through all three layers: the injector records what it corrupted\n(`inject.json`), `db_stress` records what the post-op read-back found\n(`data_corruption.<tid>.json`), and the runner rolls every run up into\n`summary.json`. The examples below are from a real 40-run compaction campaign:\n\n```bash\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 40 \\\n    --seed 424242 --stress_cmd <db_stress> --report_dir <dir>\n```\n\n**Orchestration layer** -- `summary.json`'s `outcome_counts` (how many of the\ncampaign's runs landed in each bucket), the whole campaign at a glance:\n\n| SDC | CORRUPTION | CRASH | NO_EFFECT | NO_INJECTION | ERROR |\n| --- | ---------- | ----- | --------- | ------------ | ----- |\n|   2 |         10 |     0 |        25 |            3 |     0 |\n\n### A silent data corruption (SDC): `run_00023`\n\n**Injection layer** -- `run_00023/inject.json`: an `eflags` flag-flip on the\ncompaction iterator's key-copy path; the op did NOT crash\n(`db_stress_crash_signal: null`):\n\n```json\n{\n  \"injection_result\": \"injected\",\n  \"db_stress_crash_signal\": null,\n  \"op\": \"compaction\",\n  \"op_index\": 6,\n  \"entry_fn\": \"rocksdb::CompactionJob::Run\",\n  \"target_fn\": \"rocksdb::CompactionIterator::NextFromInput\",\n  \"critical_instruction_index\": 0,\n  \"corruptions\": [\n    {\n      \"instruction\": \"cmp    $0x40,%rdx\",\n      \"register\": \"eflags\",\n      \"corruption_type\": \"flag_flip\",\n      \"before\": \"0x287\",\n      \"after\": \"0x286\",\n      \"details\": {\n        \"source\": \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n        \"call_chain\": [\n          \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n          \"rocksdb::IterKey::SetKeyImpl @ ./db/dbformat.h:941\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:741\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:749\",\n          \"rocksdb::CompactionIterator::NextFromInput @ db/compaction/compaction_iterator.cc:781\"\n        ]\n      }\n    }\n  ],\n  \"ops_seen\": 6,\n  \"critical_instructions_seen\": 1\n}\n```\n\n**Detection layer** -- `run_00023/data_corruption.<tid>.json`: the post-op\nread-back found a committed key missing:\n\n```json\n{\n  \"kind\": \"lost\",\n  \"cf\": 0,\n  \"key\": 202,\n  \"value_from_db\": \"\",\n  \"value_from_expected\": \"010000000504070609080B0A0D0C0F0E\",\n  \"op_status\": \"Get: NotFound\"\n}\n```\n\nReading it: the flag flip mis-copied the compaction output key, dropping key 202\nfrom the output SST. The op returned OK and no checksum fired, but reading key\n202 back returns `NotFound` for a committed key, so the runner classifies the run\n`SDC` (`kind=lost`) -- the bug class this tool exists to surface.\n\n## Auxiliary entry point: `injector.py`\n\n`injector.py` is **not run on its own** -- there is no `python3 injector.py`\nusage. It only works inside `gdb`'s embedded Python (it does `import gdb`), so\n`runner.py` runs it by launching `gdb` with the injector as gdb's script. Each\nrun's invocation looks like:\n\n```bash\ngdb --batch --nx \\\n    -iex 'py import sys; sys.argv=[...]' \\\n    -x tools/cpu_corruption_injector/injector.py \\\n    --args <db_stress> <db_stress flags...>\n```\n\n- `--batch` runs `gdb` non-interactively and exits when the script finishes;\n  `--nx` skips the user's `~/.gdbinit` so their config can't change behavior.\n- `-iex 'py ... sys.argv=[...]'` runs a Python command *before* the script loads,\n  seeding `injector.py`'s `sys.argv` with its parameters (`--op`, `--op_index`,\n  `--entry_fn`, `--target_fn`, `--seed`, `--dir`) -- gdb otherwise hands a `-x`\n  script an empty argv.\n- `-x tools/cpu_corruption_injector/injector.py` is the script `gdb` executes in\n  its embedded Python.\n- `--args <db_stress> <db_stress flags...>` is the program `gdb` launches and\n  debugs -- the `db_stress` binary and its flags, which `gdb` starts, stops\n  mid-op, and corrupts.\n","isInternal":false,"tokens":2815,"sizeBytes":10104}],"systemPromptSnippet":"<yakaai_skills repo=\"facebook/rocksdb\">\n<!-- File: AGENTS.md (Tokens: ~73 | Category: root-instruction) -->\n# Agent Instructions\n\nThis repository's authoritative agent instructions live in `CLAUDE.md`.\n\nRead and follow [`CLAUDE.md`](./CLAUDE.md) in full before making changes or\nreviewing code in this checkout.\n\nIf there is any ambiguity between this file and `CLAUDE.md`, `CLAUDE.md` takes\nprecedence.\n\n<!-- File: tools/c_api_gen/abi_type_overrides.json (Tokens: ~667 | Category: anthropic-skill) -->\n{\n  \"schema_version\": 1,\n  \"description\": [\n    \"ABI-preserving C type overrides for auto-generated C API wrappers.\",\n    \"\",\n    \"RocksDB's C API has a strong backward-compatibility guarantee: the C\",\n    \"signature of a function that has already shipped must never change, even\",\n    \"when the underlying C++ field type would naturally map to a different C\",\n    \"type. The auto-generator derives the C type from the C++ field (e.g. bool\",\n    \"-> unsigned char, uint64_t -> uint64_t, an enum -> int). For a handful of\",\n    \"pre-existing functions the historical hand-written C type differs from\",\n    \"that natural mapping, so we pin it here. The generated body still casts to\",\n    \"the real C++ field type via static_cast<decltype(field)>(value), so the\",\n    \"behavior is identical -- only the public C parameter/return type is held\",\n    \"stable.\",\n    \"\",\n    \"Only add entries for functions that already shipped with a different type.\",\n    \"Brand-new functions should use the natural mapping. The equivalence\",\n    \"validator (validate_generated_equivalence.py) enforces that generated\",\n    \"signatures match the reference revision, so any unintended drift here will\",\n    \"fail CI.\"\n  ],\n  \"overrides\": [\n    {\n      \"function\": \"rocksdb_writeoptions_disable_WAL\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int disable` long before codegen; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_restore_options_set_keep_log_files\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"bool\",\n      \"reason\": \"Shipped as `int v`; the field is bool but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_checksum\",\n      \"role\": \"setter\",\n      \"c_type\": \"char\",\n      \"field_cxx_type\": \"ChecksumType\",\n      \"reason\": \"Shipped as `char`; the field is the ChecksumType enum but the C parameter type must stay `char` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_format_version\",\n      \"role\": \"setter\",\n      \"c_type\": \"int\",\n      \"field_cxx_type\": \"uint32_t\",\n      \"reason\": \"Shipped as `int`; the field is uint32_t but the C parameter type must stay `int` for ABI compatibility.\"\n    },\n    {\n      \"function\": \"rocksdb_block_based_options_set_block_size\",\n      \"role\": \"setter\",\n      \"c_type\": \"size_t\",\n      \"field_cxx_type\": \"uint64_t\",\n      \"reason\": \"Shipped as `size_t block_size`; the field is uint64_t but the C parameter type must stay `size_t` for ABI compatibility.\"\n    }\n  ]\n}\n\n<!-- File: tools/c_api_gen/api_compatibility_allowlist.json (Tokens: ~502 | Category: anthropic-skill) -->\n{\n  \"schema_version\": 1,\n  \"description\": [\n    \"Documented, intentional backward-incompatible changes to the public C API\",\n    \"(include/rocksdb/c.h), checked by check_api_compatibility.py.\",\n    \"\",\n    \"Each entry suppresses one otherwise-failing finding. 'kind' is 'removed'\",\n    \"(a function that existed in the baseline is gone) or 'changed' (its\",\n    \"signature changed). Only add entries for changes that are deliberate and\",\n    \"reviewed; every entry needs a reason.\"\n  ],\n  \"allow\": [\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_writebatch_wi_create_from\",\n      \"reason\": \"Declared in c.h but never implemented anywhere in RocksDB (WriteBatchWithIndex has no constructor from a serialized representation). The symbol never existed, so no consumer could have linked against it; the dead declaration was removed.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_user_key_common_prefix\",\n      \"reason\": \"Getter for the format_version 8 'user_key_common_prefix' table property, which a predecessor (D116105558) reserved for a whole-file common-prefix optimization that was investigated and rejected. The property and this generated getter are removed before format_version 8 (and thus the property) appears in any release, so no released consumer could depend on it.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_set_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_ingestexternalfileoptions_get_write_global_seqno\",\n      \"reason\": \"Removed with the write_global_seqno option after its deprecation in RocksDB 8.0. Ingestion now always records assigned sequence numbers in the MANIFEST.\"\n    },\n    {\n      \"kind\": \"removed\",\n      \"function\": \"rocksdb_table_properties_external_sst_file_global_seqno_offset\",\n      \"reason\": \"Removed after write_global_seqno was removed because RocksDB no longer mutates the global sequence number stored in external SST files during ingestion.\"\n    }\n  ]\n}\n\n<!-- File: tools/c_api_gen/auto_simple_bindings_blocklist.json (Tokens: ~4866 | Category: anthropic-skill) -->\n{\n  \"schema_version\": 1,\n  \"families\": [\n    {\n      \"name\": \"ReadOptions\",\n      \"entries\": [\n        {\n          \"field\": \"snapshot\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"timestamp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iter_start_ts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"merge_operand_count_threshold\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_lower_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"iterate_upper_bound\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"table_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental index-selection compatibility policy that needs explicit legacy C API mapping.\"\n        },\n        {\n          \"field\": \"table_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Non-owning pointer paired with the legacy C read-options factory shim; the C wrapper owns a shared_ptr and stores this borrowed pointer.\"\n        },\n        {\n          \"field\": \"request_id\",\n          \"policy\": \"manual\",\n          \"reason\": \"Needs pointer, slice, callback, or other non-trivial C binding policy that the simple generator cannot infer.\"\n        },\n        {\n          \"field\": \"read_scoped_block_buffer_provider\",\n          \"policy\": \"manual\",\n          \"reason\": \"Field type 'ReadScopedBlockBufferProvider *' is a pointer/owning handle to a complex type; needs an explicit C ownership and lifetime design rather than a simple scalar/enum/string wrapper.\"\n        },\n        {\n          \"field\": \"custom_context\",\n          \"policy\": \"manual\",\n          \"reason\": \"Opaque non-owning pointer needs an explicit C ownership and lifetime design rather than a generated binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"DBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"mutex_hold_log_threshold_us\",\n          \"policy\": \"deferred\",\n          \"reason\": \"Experimental mutex diagnostics are configured through the existing DB option string API until the behavior and overhead are qualified.\"\n        },\n        {\n          \"field\": \"env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"sst_file_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"statistics\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"db_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"write_buffer_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"listeners\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"row_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"wal_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"file_checksum_gen_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"checksum_handoff_file_types\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"compaction_service\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"calculate_sst_write_lifetime_hint_set\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects, callback collections, or nested aggregates that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"max_manifest_file_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"writable_file_max_buffer_size\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses uint64_t but C++ field is size_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"AdvancedColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"inplace_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_insert_with_hint_prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compression_per_level\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"max_bytes_for_level_multiplier_additional\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_universal\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"compaction_options_fifo\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"memtable_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"table_properties_collector_factories\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callbacks, factories, vectors, or nested option structs that need explicit C bridging.\"\n        },\n        {\n          \"field\": \"blob_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"CompressionOptions is a nested struct; needs explicit C bridging (matches existing compaction_options_universal/fifo pattern).\"\n        },\n        {\n          \"field\": \"blob_direct_write_partition_strategy\",\n          \"policy\": \"manual\",\n          \"reason\": \"std::shared_ptr<BlobFilePartitionStrategy> \\u2014 factory/ownership-transfer type; needs explicit C bridging.\"\n        },\n        {\n          \"field\": \"soft_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        },\n        {\n          \"field\": \"hard_pending_compaction_bytes_limit\",\n          \"policy\": \"manual\",\n          \"reason\": \"ABI type mismatch: legacy C API uses size_t but C++ field is uint64_t. Hand-written binding preserved for ABI compatibility.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ColumnFamilyOptions\",\n      \"entries\": [\n        {\n          \"field\": \"comparator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"merge_operator\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_filter_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"bottommost_compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_opts\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compression_manager\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"prefix_extractor\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"table_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"cf_paths\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"compaction_thread_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"sst_partitioner_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses custom components or nested option objects that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"EnvOptions\",\n      \"entries\": [\n        {\n          \"field\": \"rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores an external object pointer that needs explicit ownership policy in the C API.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactRangeOptions\",\n      \"entries\": [\n        {\n          \"field\": \"full_history_ts_low\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        },\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation or timestamp state that needs explicit C API policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OpenAndCompactOptions\",\n      \"entries\": [\n        {\n          \"field\": \"canceled\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses caller-owned cancellation state that should not be exposed as a blind auto-generated field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"GetColumnFamilyMetaDataOptions\",\n      \"entries\": [\n        {\n          \"field\": \"range\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a range object that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedTableOptions\",\n      \"entries\": [\n        {\n          \"field\": \"flush_block_policy_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"metadata_cache_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"block_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"persistent_cache\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"cache_usage_options\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"filter_policy\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"user_defined_index_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, caches, or nested option objects that need explicit ownership or non-scalar marshalling.\"\n        },\n        {\n          \"field\": \"use_udi_as_primary_index\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"fail_if_no_udi_on_open\",\n          \"policy\": \"manual\",\n          \"reason\": \"Deprecated compatibility alias for index_mode with explicit legacy C wrapper semantics.\"\n        },\n        {\n          \"field\": \"index_mode\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses experimental enum semantics plus legacy UDI boolean compatibility wrappers that need explicit mapping.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionOptionsFIFO\",\n      \"entries\": [\n        {\n          \"field\": \"file_temperature_age_thresholds\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses collection-style configuration that needs dedicated marshalling rather than a simple scalar binding.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"BackupEngineOptions\",\n      \"entries\": [\n        {\n          \"field\": \"backup_env\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"info_log\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"backup_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        },\n        {\n          \"field\": \"restore_rate_limiter\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores external objects and rate limiters that need explicit C ownership and lifetime policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CreateBackupOptions\",\n      \"entries\": [\n        {\n          \"field\": \"progress_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        },\n        {\n          \"field\": \"exclude_files_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses callback hooks that need dedicated C callback plumbing.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"RestoreOptions\",\n      \"entries\": [\n        {\n          \"field\": \"alternate_dirs\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses a collection of alternate directories that needs explicit marshalling.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"custom_mutex_factory\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"lock_mgr_handle\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"rollback_deletion_type_callback\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"secondary_indices\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_snapshot_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"wp_commit_cache_bits\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        },\n        {\n          \"field\": \"autogenerate_name\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses factories, handles, callbacks, or internal collections that need hand-designed C bridging.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionOptions\",\n      \"entries\": [\n        {\n          \"field\": \"cmp\",\n          \"policy\": \"manual\",\n          \"reason\": \"Stores a comparator-like object pointer that needs explicit ownership policy.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"OptimisticTransactionDBOptions\",\n      \"entries\": [\n        {\n          \"field\": \"shared_lock_buckets\",\n          \"policy\": \"manual\",\n          \"reason\": \"Uses shared internal synchronization state that should not be exposed as a blind field wrapper.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"FlushJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"input_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"input_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_files\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"output_file_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_addition_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"blob_file_garbage_infos\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects or collections that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"SubcompactionJobInfo\",\n      \"entries\": [\n        {\n          \"field\": \"stats\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"ExternalFileIngestionInfo\",\n      \"entries\": [\n        {\n          \"field\": \"table_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns nested metadata objects that need dedicated accessors rather than a simple scalar getter.\"\n        }\n      ]\n    },\n    {\n      \"name\": \"TableProperties\",\n      \"entries\": [\n        {\n          \"field\": \"user_collected_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        },\n        {\n          \"field\": \"readable_properties\",\n          \"policy\": \"manual\",\n          \"reason\": \"Returns map-like metadata that needs dedicated marshalling rather than a simple scalar getter.\"\n        }\n      ]\n    }\n  ]\n}\n\n<!-- File: tools/c_api_gen/equivalence_allowlist.json (Tokens: ~69 | Category: anthropic-skill) -->\n{\n  \"allowlist\": [\n    {\n      \"name\": \"rocksdb_transactiondb_options_set_use_per_key_point_lock_mgr\",\n      \"reason\": \"The old handwritten implementation existed in db/c.cc but was not declared in include/rocksdb/c.h. The generated declaration intentionally fixes that historical inconsistency.\"\n    }\n  ]\n}\n\n<!-- File: tools/c_api_gen/spec.json (Tokens: ~11393 | Category: anthropic-skill) -->\n{\n  \"sections\": [\n    {\n      \"name\": \"DB data operations\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_merge_cf\",\n          \"call_expr\": \"db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_put_cf_with_ts\",\n          \"call_expr\": \"db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_cf_with_ts\",\n          \"call_expr\": \"db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_singledelete_cf_with_ts\",\n          \"call_expr\": \"db->rep->SingleDelete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"ts\",\n              \"len_name\": \"tslen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(ts, tslen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_delete_range_cf\",\n          \"call_expr\": \"db->rep->DeleteRange\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"start_key\",\n              \"len_name\": \"start_key_len\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"end_key\",\n              \"len_name\": \"end_key_len\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(start_key, start_key_len)\",\n            \"Slice(end_key, end_key_len)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_cf\",\n          \"call_expr\": \"db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_flush_wal\",\n          \"call_expr\": \"db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_pause_background_work\",\n          \"call_expr\": \"db->rep->PauseBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_continue_background_work\",\n          \"call_expr\": \"db->rep->ContinueBackgroundWork\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_disable_file_deletions\",\n          \"call_expr\": \"db->rep->DisableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_enable_file_deletions\",\n          \"call_expr\": \"db->rep->EnableFileDeletions\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_checksum\",\n          \"call_expr\": \"db->rep->VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_verify_file_checksums\",\n          \"call_expr\": \"db->rep->VerifyFileChecksums\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_t*\",\n              \"name\": \"db\"\n            }\n          ],\n          \"method_args\": [\n            \"ReadOptions()\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_destroy_db\",\n          \"call_expr\": \"DestroyDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_repair_db\",\n          \"call_expr\": \"RepairDB\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_options_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const char*\",\n              \"name\": \"name\"\n            }\n          ],\n          \"method_args\": [\n            \"name\",\n            \"options->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"WriteBatch\",\n      \"functions\": [\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_clear\",\n          \"call_expr\": \"b->rep.Clear\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_cf\",\n          \"call_expr\": \"b->rep.Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_delete\",\n          \"call_expr\": \"b->rep.Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_put_log_data\",\n          \"call_expr\": \"b->rep.PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_writebatch_set_save_point\",\n          \"call_expr\": \"b->rep.SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_rollback_to_save_point\",\n          \"call_expr\": \"b->rep.RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_pop_save_point\",\n          \"call_expr\": \"b->rep.PopSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_writebatch_verify_checksum\",\n          \"call_expr\": \"b->rep.VerifyChecksum\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"b\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"Transaction\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_put_cf\",\n          \"call_expr\": \"txn->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_merge_cf\",\n          \"call_expr\": \"txn->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_delete_cf\",\n          \"call_expr\": \"txn->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"column_family->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_commit\",\n          \"call_expr\": \"txn->rep->Commit\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback\",\n          \"call_expr\": \"txn->rep->Rollback\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_put_log_data\",\n          \"call_expr\": \"txn->rep->PutLogData\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"blob\",\n              \"len_name\": \"len\"\n            }\n          ],\n          \"method_args\": [\n            \"Slice(blob, len)\"\n          ]\n        },\n        {\n          \"kind\": \"void_method\",\n          \"name\": \"rocksdb_transaction_set_savepoint\",\n          \"call_expr\": \"txn->rep->SetSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transaction_rollback_to_savepoint\",\n          \"call_expr\": \"txn->rep->RollbackToSavePoint\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transaction_t*\",\n              \"name\": \"txn\"\n            }\n          ],\n          \"method_args\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"TransactionDB simple\",\n      \"functions\": [\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_put_cf\",\n          \"call_expr\": \"txn_db->rep->Put\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vallen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\",\n            \"Slice(val, vallen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_write\",\n          \"call_expr\": \"db->rep->Write\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_writebatch_t*\",\n              \"name\": \"batch\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"&batch->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_merge_cf\",\n          \"call_expr\": \"txn_db->rep->Merge\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"val\",\n              \"len_name\": \"vlen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, klen)\",\n            \"Slice(val, vlen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"klen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"Slice(key, klen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_delete_cf\",\n          \"call_expr\": \"txn_db->rep->Delete\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_writeoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            },\n            {\n              \"kind\": \"slice\",\n              \"name\": \"key\",\n              \"len_name\": \"keylen\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\",\n            \"Slice(key, keylen)\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_wal\",\n          \"call_expr\": \"txn_db->rep->FlushWAL\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"unsigned char\",\n              \"name\": \"sync\"\n            }\n          ],\n          \"method_args\": [\n            \"sync\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\"\n          ]\n        },\n        {\n          \"kind\": \"status_method\",\n          \"name\": \"rocksdb_transactiondb_flush_cf\",\n          \"call_expr\": \"txn_db->rep->Flush\",\n          \"params\": [\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_transactiondb_t*\",\n              \"name\": \"txn_db\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"const rocksdb_flushoptions_t*\",\n              \"name\": \"options\"\n            },\n            {\n              \"kind\": \"scalar\",\n              \"c_type\": \"rocksdb_column_family_handle_t*\",\n              \"name\": \"column_family\"\n            }\n          ],\n          \"method_args\": [\n            \"options->rep\",\n            \"column_family->rep\"\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"BlockBasedOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_data_block_hash_ratio\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.data_block_hash_table_util_ratio\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_top_level_index_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.top_level_index_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_partition_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.partition_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_block_based_options_set_unpartitioned_pinning_tier\",\n          \"receiver_type\": \"rocksdb_block_based_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.metadata_cache_options.unpartitioned_pinning\",\n          \"value_expr\": \"static_cast<ROCKSDB_NAMESPACE::PinningTier>(v)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"JobInfo metadata simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.input_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_files_count\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.output_files.size()\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_elapsed_micros\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.elapsed_micros\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_corrupt_keys\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_corrupt_keys\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_input_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_input_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_output_records\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.num_output_records\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_input_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_input_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_total_output_bytes\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"info->rep.stats.total_output_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_compactionjobinfo_num_input_files_at_output_level\",\n          \"receiver_type\": \"const rocksdb_compactionjobinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"size_t\",\n          \"expr\": \"info->rep.stats.num_input_files_at_output_level\"\n        },\n        {\n          \"kind\": \"string_field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cf_name\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"len_type\": \"size_t*\",\n          \"len_name\": \"size\",\n          \"expr\": \"info->rep.cf_name\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_cur\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.cur)\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_writestallinfo_prev\",\n          \"receiver_type\": \"const rocksdb_writestallinfo_t*\",\n          \"receiver_name\": \"info\",\n          \"return_type\": \"const rocksdb_writestallcondition_t*\",\n          \"expr\": \"reinterpret_cast<const rocksdb_writestallcondition_t*>(&info->rep.condition.prev)\"\n        }\n      ]\n    },\n    {\n      \"name\": \"CuckooOptions simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_cuckoo_options_set_hash_ratio\",\n          \"receiver_type\": \"rocksdb_cuckoo_table_options_t*\",\n          \"receiver_name\": \"options\",\n          \"value_type\": \"double\",\n          \"value_name\": \"v\",\n          \"field\": \"options->rep.hash_table_ratio\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Options simple\",\n      \"functions\": [\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"zstd_max_train_bytes\",\n          \"field\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_zstd_max_train_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.zstd_max_train_bytes\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"unsigned char\",\n          \"value_name\": \"use_zstd_dict_trainer\",\n          \"field\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"value\",\n          \"field\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_parallel_threads\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.compression_opts.parallel_threads\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"uint64_t\",\n          \"value_name\": \"max_dict_buffer_bytes\",\n          \"field\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_compression_options_max_dict_buffer_bytes\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"uint64_t\",\n          \"expr\": \"opt->rep.compression_opts.max_dict_buffer_bytes\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_bottommost_compression_options_use_zstd_dict_trainer\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"unsigned char\",\n          \"expr\": \"opt->rep.bottommost_compression_opts.use_zstd_dict_trainer\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"use_fsync\",\n          \"field\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_getter\",\n          \"name\": \"rocksdb_options_get_use_fsync\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"return_type\": \"int\",\n          \"expr\": \"opt->rep.use_fsync\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_disable_auto_compactions\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"disable\",\n          \"field\": \"opt->rep.disable_auto_compactions\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_optimize_filters_for_hits\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.optimize_filters_for_hits\"\n        },\n        {\n          \"kind\": \"field_setter\",\n          \"name\": \"rocksdb_options_set_report_bg_io_stats\",\n          \"receiver_type\": \"rocksdb_options_t*\",\n          \"receiver_name\": \"opt\",\n          \"value_type\": \"int\",\n          \"value_name\": \"v\",\n          \"field\": \"opt->rep.report_bg_io_stats\"\n        }\n      ]\n    }\n  ]\n}\n\n<!-- File: CLAUDE.md (Tokens: ~6321 | Category: claude-rule) -->\n# RocksDB Code Generation and Review Guidance\n\nThis document provides guidance for generating and reviewing code in the RocksDB project, derived from analysis of code review feedback across hundreds of complex merged Pull Requests. Use this as a reference when writing code with AI assistants or conducting code reviews.\n\n---\n\n## General Best Practices\n\n### Code Quality and Maintainability\n\n**Clarity and Readability:** Write clear, self-documenting code. Use meaningful variable names, add comments for complex logic, and structure code to minimize cognitive load. Avoid clever tricks that sacrifice readability for marginal performance gains unless absolutely necessary.\n\n**Consistent Style:** Follow existing code style conventions. RocksDB uses `.clang-format` for formatting, specific naming conventions, and structural patterns. Deviations from these patterns are frequently flagged in reviews.\n\n**Error Handling:** Ensure robust error handling throughout the codebase. Use RocksDB's `Status` type consistently, propagate errors appropriately, and avoid silently ignoring failures. Reviewers pay close attention to edge cases and failure modes.\n\n**Refactoring traps:** At least in production code, avoid constructs that could allow existing code to unexpectedly, quietly change meaning.\nSpecifically:\n* Avoid new defaulted parameters. This is the #1 trap on refactoring!\n* Avoid static_cast, reinterpret_cast, and C-style casts; static_cast_with_check, up_cast, and lossless_cast from cast_util.h are preferred.\n* Avoid declared type `auto` (`auto&`, `auto*` OK).\n\n### Testing Philosophy\n\n**Comprehensive Coverage:** Every change should include appropriate test coverage. This includes unit tests for isolated functionality, integration tests for component interactions, and stress tests for concurrency and performance validation. Reviewers will ask for additional tests if coverage is insufficient.\n\n**Edge Cases and Failure Modes:** Tests should explicitly cover edge cases, boundary conditions, and potential failure scenarios. This is especially important for changes affecting core database operations, compaction, or recovery logic.\n\n**Platform-Specific Testing:** RocksDB supports multiple platforms (Linux, Windows, macOS) and compilers (GCC, Clang, MSVC). Changes should be tested across relevant platforms, particularly when touching platform-specific code or using compiler-specific features.\n\n### Performance Considerations\n\n**⚠️ PERFORMANCE IS CRITICAL:** RocksDB is a high-performance storage engine where every CPU cycle and memory access matters. When writing code, always evaluate from a performance perspective. This is not optional—performance-aware coding is a fundamental requirement for all contributions.\n\n**Benchmarking and Profiling:** Performance claims should be backed by empirical evidence. Use RocksDB's benchmarking tools (e.g., `db_bench`) to validate improvements. Reviewers will request benchmark results for changes that could impact performance.\n\n**Memory Allocation:** Minimize dynamic memory allocations, especially in hot paths. Prefer stack allocation over heap allocation. Reuse buffers when possible. Consider using arena allocators or memory pools for frequent small allocations. Every `new`, `malloc`, or container resize has a cost.\n\n**Memory Copy:** Avoid unnecessary memory copies. Use move semantics, `std::string_view`, `Slice`, and pass-by-reference where appropriate. Be aware of implicit copies in STL containers and function returns. Prefer in-place operations over copy-and-modify patterns.\n\n**CPU Cache Efficiency:** Design data structures and access patterns to be cache-friendly. Keep frequently accessed data together (data locality). Prefer sequential memory access over random access. Be mindful of cache line sizes (CACHE_LINE_SIZE, typically 64 bytes) and avoid false sharing in concurrent code (see CacheAlignedWrapper). Especially when adding new data members, be mindful of ordering within structs and classes to reduce unnecessary padding (special care with bool members) and avoid larger-than-necessary types (e.g. prefer OptSlice to std::optional<Slice>).\n\n**Loop Optimization:** Look for opportunities to collapse nested loops, reduce loop overhead, and minimize branch mispredictions. Hoist invariant computations out of loops. Consider loop unrolling for tight inner loops. Batch operations when possible to amortize per-operation overhead.\n\n**SIMD and Vectorization:** Leverage SIMD instructions (SSE, AVX) for data-parallel operations when appropriate. Structure data to enable auto-vectorization by the compiler. Consider explicit SIMD intrinsics for critical hot paths like checksum computation, encoding/decoding, and bulk data processing.\n\n**Branch Prediction:** Minimize unpredictable branches in hot paths. Use `LIKELY`/`UNLIKELY` macros to hint branch prediction, e.g. for error cases and other rare or otherwise costly cases, but NOT for predicting popular configurations. Consider branchless alternatives for simple conditionals. Order switch cases and if-else chains by frequency.\n\n**Memory and Resource Management:** Be mindful of memory allocations, especially in hot paths. Use RAII patterns, smart pointers, and RocksDB's memory management utilities appropriately.\n\n**Hot Path Analysis:** When deciding how aggressively to optimize code, consider whether it's on a hot path:\n- **Hot path** (executed thousands+ times, e.g., data access, iteration, compaction loops): Performance is paramount. Apply all optimization techniques—loop collapsing, SIMD, cache optimization, pre-allocation, etc. The cost of each operation is multiplied by execution frequency.\n- **Cold path** (executed rarely, e.g., DB open, configuration parsing, error handling): Maintainability and clarity are more important. Prefer readable code over micro-optimizations. Complex optimizations here add maintenance burden with negligible performance benefit.\n- **Warm path** (moderate frequency): Balance both concerns. Use profiling data to guide optimization decisions.\n\n**Avoid Premature Optimization:** Performance is known critical in places like inner loops of compaction, read path and write path. Elsewhere, try to find a \"holy trinity\" solution of *correct, simple, and reasonably efficient*. More complex solutions are only appropriate when profiling/benchmarking data shows a measurable payoff.\n\n### API Design and Compatibility\n\n**Backwards Compatibility:** RocksDB maintains strong backwards compatibility guarantees. Breaking changes are rare and require extensive justification. When deprecating features, follow the project's deprecation policy (typically spanning multiple releases).\n\n**Behavioral Compatibility:** Behavior changes are human judgment calls that must be intentional, well-documented (including release notes), and well researched for potential downstream production impact. Agents and reviewers must call out potential gaps, ambiguity, or adverse impacts in intentionality, documentation, and production impact. For an existing accepted input—including an undocumented, discouraged, or historically ignored value—the analysis should compare old and new observable behavior, including performance and resource impact, identify known direct callers and stored configurations, and add or update regression coverage as appropriate.\n\n**API Consistency:** New APIs should be consistent with existing patterns. Use similar naming conventions, parameter ordering, and return types. Reviewers will suggest changes to improve consistency with the broader codebase.\n\n**Documentation:** Public APIs must be thoroughly documented, without unnecessary embelishment nor dwelling on implementation details nor project planning. When non-obvious, include usage examples, parameter descriptions, known bugs or limitations, notes on thread safety, performance characteristics, and compatibility considerations. Re-read comments for ambiguous terminology and phrasing, such as ambiguously re-purposed programming jargon.\n\n---\n\n## Component-Specific Guidance\n\n### Database Core (`db`)\n\nThe database core handles write-ahead logging (WAL), memtables, compaction, and recovery. This component receives the most scrutiny in code reviews.\n\n**Concurrency and Thread Safety:** Database operations are highly concurrent. Reviewers carefully examine locking strategies, atomic operations, and memory ordering. Document synchronization assumptions clearly. Use appropriate memory ordering semantics (`acquire`/`release` vs. `seq_cst`).\n\n**Compaction Logic:** Changes to compaction are complex and high-risk. Ensure that compaction logic respects configured parameters, handles edge cases (empty databases, single-file compactions), and maintains correctness under concurrent operations.\n\n**Error Propagation:** Database operations can fail in many ways (I/O errors, corruption, resource exhaustion). Ensure that errors are properly propagated, logged, and handled. Avoid assertions in production code paths.\n\n**Testing:** Database core changes require extensive testing, including unit tests, integration tests, and stress tests. Test with various configurations, compaction styles, and concurrent workloads.\n\n### Public Headers / \"Public API\" (`include/rocksdb/`)\n\nPublic headers define RocksDB's API surface. Changes here have the highest compatibility impact.\n\n**API Design:** New APIs should be intuitive, consistent with existing patterns, and well-documented. Consider how the API will be used in practice and avoid adding unnecessary complexity.\n\n**Backwards Compatibility:** Breaking changes to public APIs require extensive justification and a deprecation plan. Maintain ABI compatibility for bug fixes and patch releases.\n\n**Documentation:** Every public API must be thoroughly documented with usage examples, parameter descriptions, and notes on thread safety and performance characteristics.\n\n**Deprecation:** When deprecating APIs, follow the project's policy. Mark deprecated APIs clearly, provide migration guidance, and maintain support for at least one major release.\n\n### Internal Utilities (`util`)\n\nInternal utilities provide common functionality used throughout the codebase.\n\n**Code Reuse:** Utilities should be general-purpose and reusable. Avoid duplicating functionality that already exists elsewhere in the codebase.\n\n**Error Handling:** Utility functions should handle errors robustly and propagate them appropriately. Consider edge cases like overflow, underflow, and invalid inputs.\n\n**Testing:** Utility functions should have comprehensive test coverage, including edge cases and failure modes. Consider adding death tests for assertions.\n\n**Performance:** Utilities are often used in hot paths. Ensure that implementations are efficient and avoid unnecessary allocations or copies.\n\n### Table Management (`table`)\n\nTable management handles SST file format, block-based tables, and table readers/writers.\n\n**Block Format and Checksums:** Changes to block format require extreme care. Ensure that checksums are computed and verified correctly. Test with various compression algorithms and block sizes.\n\n**Iterator Correctness:** Table iterators are used throughout the codebase. Ensure that iterator semantics (Seek, Next, Prev) are correct, especially at boundaries and with deletions.\n\n**Caching and Prefetching:** Table readers interact with the block cache and prefetching logic. Ensure that cache keys are unique and that prefetching respects configured limits.\n\n**Performance:** Table operations are performance-critical. Benchmark changes that could impact read or write performance.\n\n### Utilities (`utilities`)\n\nUtilities include optional features like transactions, backup engine, and checkpoint.\n\n**Feature Isolation:** Utilities should be self-contained and not introduce unnecessary dependencies on core database internals.\n\n**Deprecation and Cleanup:** Legacy features are being phased out. When removing deprecated code, ensure that migration paths are documented and that users have sufficient warning.\n\n**Cross-Platform Compatibility:** Utilities often interact with OS-specific APIs. Ensure that code works on all supported platforms.\n\n### Options and Configuration (`options`)\n\nOptions define RocksDB's configuration system.\n\n**Type Safety:** Use appropriate types for options (e.g., `uint32_t` for flags, scoped enums for enumerated values).\n\n**Deprecation Policy:** When deprecating options, follow the project's policy. Document the deprecation, provide migration guidance, and maintain support for at least one major release.\n\n**Dynamic Configuration:** Some options can be changed dynamically. Ensure that dynamic changes are thread-safe and take effect correctly.\n\n**Validation:** Validate option values and provide clear error messages for invalid configurations.\n\n### Cache (`cache`)\n\nCache management is critical for RocksDB's performance.\n\n**Concurrency:** Cache operations are highly concurrent. Ensure that implementations are thread-safe and use appropriate synchronization primitives.\n\n**Performance:** Cache operations are in the hot path. Optimize for low latency and high throughput. Benchmark changes carefully.\n\n**Memory Management:** Cache implementations must manage memory carefully to avoid leaks and excessive allocations.\n\n**Eviction Policies:** Changes to eviction policies should be well-tested and benchmarked to ensure they improve overall performance.\n\n---\n\n## Code Review Checklist\n\nWhen reviewing RocksDB code (or preparing code for review), use this checklist:\n\n### Contract Boundaries\n- [ ] Is each behavior owned by the right layer? High-level policy (for example,\n  \"compaction wants this I/O mode\") should live at the caller/policy layer, while\n  lower layers should expose generic mechanisms (for example, \"open a fresh\n  reader\", \"skip shared cache insertion\", or \"use these FileOptions\").\n- [ ] Do comments and names describe local contracts rather than leaking a\n  specific caller's rationale into reusable APIs? Generic code should not need to\n  know about one current use case unless the API itself is intentionally\n  use-case-specific.\n- [ ] Does each flag or parameter control one coherent behavior? If one boolean\n  starts implying ownership, cache policy, I/O mode, prefetching, and caller\n  identity, split it into explicit flags or an options struct.\n- [ ] Could a future caller use this lower-level API without accidentally\n  inheriting assumptions from compaction, backup, user reads, or a particular\n  table format? If not, tighten the contract with assertions, clearer names, or\n  a narrower API.\n- [ ] Are implementation details not being used as policy signals? Prefer an\n  explicit contract over inferring behavior from incidental fields such as file\n  options, cache handles, or current table-reader state.\n\n### Correctness\n- [ ] Does the change preserve database semantics (e.g., snapshot isolation, key ordering)?\n- [ ] Are all error cases handled appropriately?\n- [ ] Is the change thread-safe? Are synchronization primitives used correctly?\n- [ ] Are there any potential data races or deadlocks?\n\n### Testing\n- [ ] Does the change include appropriate test coverage?\n- [ ] Are edge cases and failure modes tested?\n- [ ] Have the tests been run on all supported platforms?\n- [ ] Are stress tests passing?\n\n### Performance\n- [ ] Are there benchmark results for performance-sensitive changes?\n- [ ] Does the change avoid unnecessary allocations or copies?\n- [ ] Are hot paths optimized appropriately?\n\n### API and Compatibility\n- [ ] Is the change backwards compatible?\n- [ ] Are new APIs consistent with existing patterns?\n- [ ] Is the public API documented?\n- [ ] Are deprecated features handled according to policy?\n\n### Code Quality\n- [ ] Does the code follow RocksDB's style conventions?\n- [ ] Is the code clear and maintainable?\n- [ ] Are comments and documentation sufficient?\n- [ ] Are there any code smells or anti-patterns?\n\n---\n\n## Common Review Feedback Patterns\n\nThe following patterns emerged as frequent sources of review feedback:\n\n1. **Test Coverage:** Reviewers frequently request additional tests for edge cases, platform-specific behavior, and failure modes. Complex changes require comprehensive test coverage including unit tests, integration tests, and stress tests.\n\n2. **Error Handling:** Ensure proper error propagation using RocksDB's `Status` type. Avoid silent failures and provide clear error messages that include context about what failed and why.\n\n3. **API Design:** New APIs should be consistent with existing patterns. Use descriptive names that follow established conventions. Avoid breaking changes without strong justification and a clear deprecation plan.\n\n4. **Documentation:** Public APIs must be documented with usage examples and notes on thread safety, performance characteristics, and compatibility considerations. Complex internal logic should also be well-commented.\n\n5. **Performance:** Performance-sensitive changes require benchmark results to validate improvements. Use `db_bench` and other profiling tools to measure impact. Avoid premature optimization that adds complexity without measurable benefit.\n\n6. **Concurrency:** Thread safety is critical in RocksDB. Document synchronization assumptions clearly. Use appropriate memory ordering semantics. Consider potential race conditions and deadlocks.\n\n7. **Code Style:** Follow existing conventions for naming, formatting, and structure. Use `.clang-format` for consistent formatting. Prefer scoped enums (`enum class`) over unscoped enums.\n\n8. **Backwards Compatibility:** RocksDB maintains strong compatibility guarantees. Breaking changes require extensive justification. When deprecating features, provide migration guidance and maintain support across multiple releases.\n\n9. **Refactoring:** Reviewers appreciate refactoring that improves code readability and maintainability. Look for opportunities to deduplicate code and simplify complex logic.\n\n10. **Platform Compatibility:** Ensure changes work correctly on all supported platforms (Linux, Windows, macOS) and with all supported compilers (GCC, Clang, MSVC).\n\n11. **Contract Boundary Leaks:** When a change plumbs a new option or use-case\nspecific behavior through multiple subsystems, review the call chain for\ncontract leaks. Caller-specific rationale belongs at the call site or public API\ndocumentation; reusable layers should expose precise, layer-local capabilities.\nWatch especially for comments mentioning one caller in generic code, booleans\nthat silently bundle several behaviors, and downstream code inferring policy\nfrom an implementation detail instead of an explicit option.\n\n---\n\n## Important tips\n\n### Pull request and diff summaries\n* Before writing or updating an external RocksDB pull request summary or its\n  corresponding internal Phabricator diff summary, read and follow\n  `claude_md/pull_request_summary_guideline.md`.\n\n### Build system\n* There are 3 build system. Make for git clones, BUCK (meta internal) for hg\n  clones, and CMake for some special cases.\n* When a new .cc file is added, update Makefile, CMakeLists.txt, src.mk, BUCK.\n* Don't manually edit BUCK file, after updating src.mk, run\n    /usr/local/bin/python3 buckifier/buckify_rocksdb.py to update it\n* For -j in make command, use the number of CPU cores to decide it.\n* When searching for references to something (a symbol, library, etc.), do not\n  restrict or truncate your search based on presumed relevance or scope. It is\n  important and time-saving to keep the repo reasonably consistent across\n  different build systems, programming languages, and even between\n  documentation and implementation.\n\n### Avoiding mixed build modes with Make (use `AUTO_CLEAN=1`)\n\nObject files are written to the same paths regardless of build flags, so\nreusing objects from a prior build with different flags causes confusing\nlinker errors, etc. This problem is essentially avoidable by ALWAYS using\n`AUTO_CLEAN=1 make -j<n> <something>` for manual make invocations. This\nwill automatically clean object files if the build parameters/flavor have\nchanged. The `build_tools/rockstest.sh` / `rocksptest.sh` helpers described\nbelow set `AUTO_CLEAN=1` for you.\n\n`AUTO_CLEAN=1` does not fix Make failures associated with stale .d files\nreferring to removed files. Resolve that manually or with `make clean`\nwithout complaining to the user.\n\n### Source checks\n* Run `make check-sources` before committing. This catches non-ASCII\n    characters in source files and other source-level issues that CI will\n    reject. In particular, **do not use Unicode characters** (em dashes,\n    smart quotes, etc.) in comments or strings -- use ASCII equivalents\n    (`--` instead of em dash, `'` instead of smart quote, etc.).\n\n### License headers\n* Every new source file needs a license header. For a file that does **not**\n    carry an outside/third-party copyright, use the standard Meta dual-licensed\n    header (the dual-license designation is required -- a bare\n    \"All Rights Reserved\" copyright is not an acceptable open-source header):\n    ```\n    //  Copyright (c) Meta Platforms, Inc. and affiliates.\n    //  This source code is licensed under both the GPLv2 (found in the\n    //  COPYING file in the root directory) and Apache 2.0 License\n    //  (found in the LICENSE.Apache file in the root directory).\n    ```\n    Use a `#` comment prefix instead of `//` for shell, Python, and Makefile\n    fragments.\n* Files derived from an external source (e.g. LevelDB) keep their original\n    upstream copyright line in addition to the header above.\n\n### RTTI and dynamic_cast\n* Production code and `db_stress` must build in **release mode\n    (`-fno-rtti`)**. Do not use `dynamic_cast` anywhere except unit tests.\n    Use `static_cast_with_check` from `util/cast_util.h` (validates with\n    `dynamic_cast` in debug builds, plain `static_cast` in release).\n* Unit tests (`*_test.cc`) are built in debug mode with RTTI enabled.\n\n### Cross-platform / portability\nLocal `make` only exercises Linux with GCC/Clang, but CI\n(`.github/workflows/pr-jobs.yml` and `nightly.yml`) gates on a much wider\nmatrix, so portability breaks are invisible locally until CI fails. Code must\nbuild (and where noted, run tests) across:\n\n| Axis | Must support |\n|------|--------------|\n| OS | Linux (x86_64 + ARM), macOS, Windows |\n| Architecture | Little-endian and big-endian targets, including Linux on s390x |\n| Compiler | GCC, Clang (libstdc++ **and** libc++), AppleClang, **MSVC (VS2022)**, MinGW (Linux cross-compile, build-only, no gflags) |\n| Build system | Make, CMake, and BUCK (internal) -- keep all in sync (see \"Build system\" above) |\n| Config | release (`-fno-rtti`), `ASSERT_STATUS_CHECKED`, ASAN/UBSAN/TSAN, folly, unity build, JNI/Java |\n\nTreat these as constraints to satisfy and infer the specifics from them before\nadding any system header, libc call, or compiler-specific construct. The most\ncommon trap: anything that compiles under GCC/Clang on Linux but not under\n**MSVC/MinGW** -- e.g. unguarded POSIX-only headers/functions (`<unistd.h>`,\n`<sys/*.h>`, `getpid`, `_exit`, ...) or GCC/Clang extensions\n(`__attribute__`, `__builtin_*`, VLAs, `alloca`). Prefer the `port::`/`Env`\nabstractions; otherwise guard with `#ifdef OS_WIN` (POSIX `<unistd.h>` ->\nWindows `<process.h>`). Because libc++ is also tested, include what you use\nrather than relying on libstdc++ transitive includes.\n\nDo not use `static_assert` to reject a supported architecture for an optional\nfeature. Check an existing `port::` capability such as `port::kLittleEndian`\nand disable only the unsupported feature so the rest of RocksDB still builds.\nUse a portable representation when the feature itself must work across\narchitectures.\n\n### Unit Test\n* After all of the unit tests are added, review them and try to extract common\n    reusable utility functions to reduce code duplication due to copy past between\n    unit tests. This should be done every time unit test is updated.\n* Don't use sleep to wait for certain events to happen. This will cause test to\n    be flaky. Instead, use sync point to synchronize thread progress.\n* Cap unit test execution with 60 seconds timeout.\n* To build and run unit tests locally, prefer these helper scripts:\n    * `build_tools/rocksptest.sh <test_binary> [more_binaries...] [args...]`\n        builds the binary(ies) with parallel make and `AUTO_CLEAN=1` and runs\n        them under gtest-parallel, sharding the test cases across CPUs. Prefer\n        this whenever running more than a couple of test cases, e.g.\n        `build_tools/rocksptest.sh table_test` or\n        `build_tools/rocksptest.sh db_test env_test --gtest_filter=*Foo*`.\n    * `build_tools/rockstest.sh <test_binary> [args...]` builds with parallel\n        make and `AUTO_CLEAN=1` and runs the binary directly (serially).\n        Use it only for a very small number of test cases, e.g.\n        `build_tools/rockstest.sh db_test --gtest_filter=*MixedSlowdown*`.\n* After writing a test, stress-test for flakiness (AUTO_CLEAN handles the\n    rebuild needed by the `COERCE_CONTEXT_SWITCH=1` flag change):\n    ```bash\n    COERCE_CONTEXT_SWITCH=1 build_tools/rockstest.sh {test_binary} -r100 \\\n        --gtest_filter=\"*YourTestName*\"\n    ```\n* For CI-style flaky tests that do not reproduce with `gtest_parallel.py`,\n    `--gtest_repeat`, or normal coerce-mode runs, inspect\n    `tools/gtest_parallel_repro.py --help`.\n* Each unit test file has overheads, so avoid creating new unit test files\n  for random minor features. Consider adding to slice_test, db_etc3_test, or\n  others.\n\n### Unit test dedup guidelines\n* Extract helper functions for repeated patterns such as object\n    construction, round-trip (encode → decode → verify), and common\n    assertion sequences.\n* Use table-driven tests (struct array + loop) when multiple test cases\n    share the same logic but differ only in input/expected data.\n* Prefer randomized tests over exhaustive parameter permutations. Use\n    `Random` from `util/random.h` (not `std::mt19937`). Use a time-based\n    seed with `SCOPED_TRACE(\"seed=\" + std::to_string(seed))` so failures\n    are reproducible.\n* Keep deterministic edge-case tests separate from randomized tests\n    (error paths, boundary conditions, format verification).\n* Methods only used in tests should be private with `friend class` +\n    `TEST_F` fixture wrappers. In wrappers, always fully qualify the\n    target method to avoid infinite recursion.\n\n### Adding new public API\n    Refer to claude_md/add_public_api.md\n\n### Changing existing public API behavior\n    Follow the Behavioral Compatibility requirements above.\n\n### Adding new option\n    Refer to claude_md/add_option.md\n\n### Removing deprecated option\n    Refer to claude_md/remove_option.md\n\n### Metrics\n* When adding a new feature, evaluate whether there is opportunity to add\n    metrics. Try to avoid causing performance regression on hot path when adding\n    metrics.\n\n### Stress test\n* When adding a new feature, make sure stress test covers the new option.\n\n### Component docs\n* For component-level design notes and implementation walkthroughs, start with\n    `docs/components/index.md`.\n* Documentation under `docs/components/` is organized by subsystem in\n    `docs/components/<area>/`.\n* Each subsystem directory should have an `index.md` entry point plus focused\n    chapter files for deeper topics.\n\n### DB bench update\n* When adding a performance related feature, support it in db_bench\n\n### Adding release note\n* Release note should be kept short at high level for external user consumption.\n    Release notes identify what users might care about most in a release. They\n    are not exhaustive and are not a guide. PLEASE learn from past agents who\n    tried to build elaborate release notes with implementation details and\n    elsewhere-documented nuance. That wastes time. Fight the bias that\n    \"my change\" is important so must be worthy of release note mention.\n* If more than single markdown line, consider how their formatting will be\n    integrated into HISTORY.md.\n\n### Blog posts (docs/_posts)\n* Blog post authors must be defined in `docs/_data/authors.yml` to be displayed\n\n### Final verification of the change\n* Execute `AUTO_CLEAN=1 make check` to build all of the changes and execute all\n    of the tests. `AUTO_CLEAN=1` ensures a clean rebuild if your previous build\n    used different parameters. Note that executing all of the tests could take\n    multiple minutes.\n* Run `AUTO_CLEAN=1 ASSERT_STATUS_CHECKED=1 make check` to verify all Status\n    objects are properly checked. This catches missing error handling that can\n    lead to silent data corruption. Merely building with ASSERT_STATUS_CHECKED=1\n    accomplishes nothing; it enables a runtime check. New unit tests missing\n    Status checks is a common failure point, even from agents.\n\n### Monitoring make check progress\n* Use `make check-progress` to get machine-parseable JSON progress while\n    `make check` is running. This is useful for Claude Code to monitor long\n    builds without timeout issues.\n* Run `make check` in background, then poll progress:\n    ```bash\n    AUTO_CLEAN=1 make check &\n    # Poll periodically:\n    make check-progress\n    ```\n* The output shows current phase and progress:\n    ```json\n    {\"status\":\"running\",\"phase\":\"compiling\",\"completed\":300,\"total\":919,...}\n    {\"status\":\"running\",\"phase\":\"testing\",\"completed\":1500,\"total\":29962,\"failed\":0,\"percent\":5,...}\n    {\"status\":\"completed\",\"phase\":\"testing\",\"completed\":29962,\"total\":29962,\"failed\":0,\"percent\":100,...}\n    ```\n* Phases: `compiling` -> `linking` -> `generating` -> `testing` -> `completed`\n* Key fields: `status`, `phase`, `completed`, `total`, `failed`, `percent`\n* When tests fail, `failed_tests` array shows details (up to 10 failures):\n    ```json\n    {\"status\":\"running\",...,\"failed\":3,\"failed_tests\":[\n      {\"test\":\"cache_test-CacheTest.Usage\",\"exit_code\":1,\"signal\":0,\"output\":\"...test log...\"},\n      {\"test\":\"env_test-EnvTest.Open\",\"exit_code\":0,\"signal\":11,\"output\":\"...Segmentation fault...\"}\n    ]}\n    ```\n* `exit_code`: non-zero means test assertion failed\n* `signal`: non-zero means test was killed (e.g., 9=SIGKILL, 6=SIGABRT, 11=SIGSEGV)\n* `output`: last 50 lines of test log including error messages and stack traces\n\n### Executing benchmark using db_bench\n* Since the goal is to measure performance, we need to build a release binary\n    using `AUTO_CLEAN=1 DEBUG_LEVEL=0 make db_bench`. If there is an engine\n    crash due to a bug, switch back to a debug build with\n    `AUTO_CLEAN=1 make dbg`; `AUTO_CLEAN=1` handles the release<->debug rebuild\n    automatically.\n\n### Formatting code\n* After making change, use `make format-auto` to auto-apply formatting without\n    interactive prompts (Claude Code friendly).\n\n<!-- File: tools/advisor/README.md (Tokens: ~1039 | Category: plugin-manifest) -->\n# Rocksdb Tuning Advisor\n\n## Motivation\n\nThe performance of Rocksdb is contingent on its tuning. However,\nbecause of the complexity of its underlying technology and a large number of\nconfigurable parameters, a good configuration is sometimes hard to obtain. The aim of\nthe python command-line tool, Rocksdb Advisor, is to automate the process of\nsuggesting improvements in the configuration based on advice from Rocksdb\nexperts.\n\n## Overview\n\nExperts share their wisdom as rules comprising of conditions and suggestions in the INI format (refer\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\nUsers provide the Rocksdb configuration that they want to improve upon (as the\nfamiliar Rocksdb OPTIONS file —\n[example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini))\nand the path of the file which contains Rocksdb logs and statistics.\nThe [Advisor](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser_example.py)\ncreates appropriate DataSource objects (for Rocksdb\n[logs](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_log_parser.py),\n[options](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_options_parser.py),\n[statistics](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/db_stats_fetcher.py) etc.)\nand provides them to the [Rules Engine](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rule_parser.py).\nThe Rules uses rules from experts to parse data-sources and trigger appropriate rules.\nThe Advisor's output gives information about which rules were triggered,\nwhy they were triggered and what each of them suggests. Each suggestion\nprovided by a triggered rule advises some action on a Rocksdb\nconfiguration option, for example, increase CFOptions.write_buffer_size,\nset bloom_bits to 2 etc.\n\n## Usage\n\n### Prerequisites\nThe tool needs the following to run:\n* python3\n\n### Running the tool\nAn example command to run the tool:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --rules_spec=advisor/rules.ini --rocksdb_options=test/input_files/OPTIONS-000005 --log_files_path_prefix=test/input_files/LOG-0 --stats_dump_period_sec=20\n```\n\n### Command-line arguments\n\nMost important amongst all the input that the Advisor needs, are the rules\nspec and starting Rocksdb configuration. The configuration is provided as the\nfamiliar Rocksdb Options file (refer [example](https://github.com/facebook/rocksdb/blob/main/examples/rocksdb_option_file_example.ini)).\nThe Rules spec is written in the INI format (more details in\n[rules.ini](https://github.com/facebook/rocksdb/blob/main/tools/advisor/advisor/rules.ini)).\n\nIn brief, a Rule is made of conditions and is triggered when all its\nconstituent conditions are triggered. When triggered, a Rule suggests changes\n(increase/decrease/set to a suggested value) to certain Rocksdb options that\naim to improve Rocksdb performance. Every Condition has a 'source' i.e.\nthe data source that would be checked for triggering that condition.\nFor example, a log Condition (with 'source=LOG') is triggered if a particular\n'regex' is found in the Rocksdb LOG files. As of now the Rules Engine\nsupports 3 types of Conditions (and consequently data-sources):\nLOG, OPTIONS, TIME_SERIES. The TIME_SERIES data can be sourced from the\nRocksdb [statistics](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/statistics.h)\nor [perf context](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/perf_context.h).\n\nFor more information about the remaining command-line arguments, run:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m advisor.rule_parser_example --help\n```\n\n### Sample output\n\nHere, a Rocksdb log-based rule has been triggered:\n\n```shell\nRule: stall-too-many-memtables\nLogCondition: stall-too-many-memtables regex: Stopping writes because we have \\d+ immutable memtables \\(waiting for flush\\), max_write_buffer_number is set to \\d+\nSuggestion: inc-bg-flush option : DBOptions.max_background_flushes action : increase suggested_values : ['2']\nSuggestion: inc-write-buffer option : CFOptions.max_write_buffer_number action : increase\nscope: col_fam:\n{'default'}\n```\n\n## Running the tests\n\nTests for the code have been added to the\n[test/](https://github.com/facebook/rocksdb/tree/main/tools/advisor/test)\ndirectory. For example, to run the unit tests for db_log_parser.py:\n\n```shell\ncd rocksdb/tools/advisor\npython3 -m unittest -v test.test_db_log_parser\n```\n\n<!-- File: tools/c_api_gen/README.md (Tokens: ~3217 | Category: plugin-manifest) -->\n# RocksDB C API Code Generation Prototype\n\nThis directory contains a **prototype** for semi-automating parts of\nRocksDB's C API based on the existing C++ public API and the current C API\nconventions in `include/rocksdb/c.h` / `db/c.cc`.\n\nThe intent is **not** to automatically wrap arbitrary C++ APIs. Instead, the\ngoal is to reduce maintenance burden for the parts of the C API that are\nalready highly mechanical today.\n\n## Why a semi-automated approach\n\nRocksDB's C API follows stable conventions that downstream users rely on:\n\n- opaque handle types like `rocksdb_t*`, `rocksdb_transaction_t*`\n- `Status` translated to `char** errptr`\n- `Slice` translated to `const char*` + `size_t`\n- binary/string results copied into `malloc()`-owned buffers\n- booleans represented as `unsigned char`\n- `rocksdb_<object>_<verb>[_cf][_with_ts]` naming\n\nThese conventions are valuable and should remain the source of truth for the\ngenerated code.\n\nAt the same time, the C++ public API includes features that are poor fits for\nfully automatic wrapper generation:\n\n- callback-backed polymorphic types (`Comparator`, `MergeOperator`, etc.)\n- complex object construction/open flows\n- ownership-transferring factory setters\n- vector-heavy marshalling APIs like the `MultiGet` family\n- virtual extension points and custom bridging logic\n\nFor those cases, hand-designed wrappers remain the right tool.\n\n## Why the spec-driven generator still exists\n\nThe spec-driven generator is still needed for wrappers whose C shape cannot be\nreliably inferred from the C++ declaration alone.\n\nYes, this means `spec.json` is manually maintained. That is intentional. The\ngoal is not to eliminate human decisions; the goal is to stop hand-writing the\nsame declaration/definition boilerplate once those decisions have been made.\n\nFor many wrappers, someone still has to decide:\n\n- the C function name and parameter order\n- whether a C++ `Status` becomes `char** errptr`\n- whether default C++ objects should be synthesized, such as `ReadOptions()`\n- how ownership and lifetime should work for pointers, factories, and callbacks\n- how vectors, maps, and option collections should be flattened into C\n- whether the C API should intentionally differ from the C++ API shape\n\nThose are API design choices, not mechanical translations. The spec-driven\npath keeps those choices explicit while still generating consistent boilerplate.\n\nBackward compatibility with the existing hand-written C API is one input, but\nit is not the primary reason this layer exists. Even for brand-new wrappers, we\nstill need an explicit policy layer for non-trivial C bindings.\n\n## What this prototype focuses on\n\nThe generator currently targets representative examples from the easiest and\nmost repetitive wrapper families:\n\n1. **Simple scalar field setters/getters**\n   - `rocksdb_options_set_create_if_missing`\n   - `rocksdb_options_get_create_if_missing`\n   - `rocksdb_readoptions_set_fill_cache`\n   - `rocksdb_writeoptions_set_sync`\n   - `rocksdb_block_based_options_set_block_size`\n   - `rocksdb_cuckoo_options_set_hash_ratio`\n\n2. **Simple forwarding wrappers with no `Status`**\n   - `rocksdb_writebatch_clear`\n   - `rocksdb_writebatch_put`\n   - `rocksdb_writebatch_put_cf`\n   - `rocksdb_writebatch_delete`\n   - `rocksdb_writebatch_put_log_data`\n   - `rocksdb_writebatch_set_save_point`\n   - `rocksdb_transaction_set_savepoint`\n\n3. **Simple forwarding wrappers with `Status` -> `char** errptr`**\n   - `rocksdb_put`, `rocksdb_put_cf`\n   - `rocksdb_delete`, `rocksdb_delete_cf`\n   - `rocksdb_merge`, `rocksdb_merge_cf`\n   - `rocksdb_write`\n   - `rocksdb_writebatch_rollback_to_save_point`\n   - `rocksdb_writebatch_pop_save_point`\n   - `rocksdb_transaction_put`, `rocksdb_transaction_put_cf`\n   - `rocksdb_transaction_merge`, `rocksdb_transaction_merge_cf`\n   - `rocksdb_transaction_delete`, `rocksdb_transaction_delete_cf`\n   - `rocksdb_transaction_commit`\n   - `rocksdb_transaction_rollback`\n   - `rocksdb_transaction_rollback_to_savepoint`\n\n4. **Simple metadata accessors**\n   - `rocksdb_flushjobinfo_cf_name`\n   - `rocksdb_flushjobinfo_largest_seqno`\n\nThis is intentionally a constrained subset. The point is to demonstrate a\nmaintainable pattern and a spec format that can be extended gradually.\n\n## What should remain manual\n\nThese families should stay hand-written unless a future design adds a much\nricher generator:\n\n- comparators / merge operators / compaction filters / event listeners\n- compaction service wrappers\n- openers and constructors that build vectors/maps of descriptors/options\n- `MultiGet` / batched `MultiGet` families\n- wrappers involving `std::shared_ptr` / `std::unique_ptr` ownership transfer\n- C APIs whose behavior intentionally differs from the C++ API shape\n\n## Design principles\n\n### 1. Keep the current C API conventions\n\nThe code generator should not invent a new style. It should emit code that\nlooks like today's hand-written wrappers:\n\n- `SaveError(errptr, ...)`\n- `Slice(key, keylen)`\n- direct field assignments for plain option setters\n- same function names and signatures\n\n### 2. Let auto-discovery handle the simple direct cases\n\nFor a small set of mechanically mappable public structs, the generator can\ndiscover missing bindings directly from the C++ headers and emit the missing C\nwrappers automatically. Existing handwritten wrappers still win when they\nalready exist.\n\nToday this strict auto-discovery path is used for:\n\n- simple `ReadOptions` scalar / enum fields\n- simple scalar / enum fields across selected public option structs\n- simple metadata fields on listener/job-info structs\n- simple metadata view structs such as table-properties and compaction metadata\n\nFor those managed families, unsupported or intentionally deferred fields must\nbe explicitly recorded in `auto_simple_bindings_blocklist.json` rather than\nbeing skipped silently. Anything outside those families remains hand-written.\n\n### 3. Keep explicit spec for non-trivial wrappers\n\nThe spec-driven generator remains the right tool for method-style wrappers and\nother APIs whose C surface requires an explicit design decision. In practice:\n\n- auto-discovery owns simple direct field coverage for selected struct families\n- `spec.json` owns wrappers that are still manual in design but repetitive in\n  implementation\n- fully irregular ownership-heavy or callback-heavy APIs remain hand-written\n\n### 4. Let C++ headers guide validation, not policy\n\nLonger term, Clang/libTooling can help validate that a wrapper spec still\nmatches the underlying C++ method signature. But the C naming, ownership, and\nerror-handling policy should remain explicit in the spec.\n\n## Files\n\nSource templates (hand-written; NOT user-includable and NOT compiled directly):\n\n- `c_base.h`\n  - hand-written template for `include/rocksdb/c.h`; the generated `.h.inc`\n    fragments are inlined into it to produce the self-contained public header\n- `c_base.cc`\n  - hand-written template for `db/c.cc`; the generated `.cc.inc` fragments are\n    inlined into it to produce the compiled implementation\n\nGenerators and inputs:\n\n- `spec.json`\n  - declarative input for the spec-driven generator\n- `generate_c_api.py`\n  - emits header/source fragments from the spec\n- `auto_simple_bindings.py`\n  - auto-discovers simple public field bindings and generates checked-in\n    `.inc` files for them\n- `auto_simple_bindings_blocklist.json`\n  - checked-in exceptions for auto-managed fields that are intentionally manual\n    or temporarily deferred\n- `abi_type_overrides.json`\n  - per-function C type pins so already-shipped wrappers keep their historical\n    C signature even when the C++ field type maps to a different C type\n- `regen_all.py`\n  - orchestrates both generators and inlines the fragments into `c.h` / `c.cc`\n\nVerification (run by `make check-c-api-gen` and in CI):\n\n- `check_api_completeness.py`\n  - asserts every declared public C function has exactly one definition\n    (dependency-free; guards against link-time breakage of bindings)\n- `check_api_compatibility.py` + `api_compatibility_allowlist.json`\n  - signature-level backward-compatibility gate against a reference revision;\n    the authoritative ABI/API-stability check\n- `verify_generated_up_to_date.py`\n  - regenerates in a temp dir and confirms the checked-in output is current\n- `validate_generated_equivalence.py` + `equivalence_allowlist.json`\n  - best-effort migration aid: compares generated wrapper *bodies* against a\n    PRE-migration hand-written revision. Body comparison is heuristic; for\n    backward-compatibility rely on `check_api_compatibility.py`.\n\n## Toolchain requirements\n\nRegeneration needs two external tools:\n\n- **`clang++`** (libclang) — used to dump the C++ struct ASTs that drive\n  auto-discovery. Resolution order is `$CXX` (if it names a clang), then bare\n  `clang++`, then versioned fallbacks (`clang++-21` … `clang++-13`).\n- **`clang-format`** — used to canonicalize the generated `.inc` fragments (and\n  therefore the inlined `c.h` / `c.cc`).\n\nThe checked-in generated output is byte-reproducible only for a **pinned\nclang-format version**. CI uses **clang-format-21** (see\n`.github/workflows/pr-jobs.yml`); pin the same version locally so your\nregeneration matches CI:\n\n```bash\npython3 tools/c_api_gen/regen_all.py --clang-format clang-format-21\n# or, when running the staleness check via make:\nmake check-c-api-gen CLANG_FORMAT_BINARY=clang-format-21\n```\n\nIf `clang++` is not installed, `make check` skips the C API staleness check\nwith a message instead of failing, so it still works without the codegen\ntoolchain. CI is the authoritative gate.\n\nThe dedicated `build-linux-clang-21-no_test_run` CI job runs this target with\n`CHECK_C_API_GEN_STRICT=1`, which turns every such \"skip\" (missing `clang++` or\nclang-format, or an unresolvable compat baseline ref) into a hard error, so the\ncore CI coverage cannot silently regress to a no-op:\n\n```bash\nmake check-c-api-gen CHECK_C_API_GEN_STRICT=1 CLANG_FORMAT_BINARY=clang-format-21\n```\n\n## Running the generators\n\nFrom the repo root, to regenerate all checked-in fragments and the inlined\n`c.h` / `c.cc`:\n\n```bash\npython3 tools/c_api_gen/regen_all.py\n```\n\nThis regenerates:\n\n- the spec-driven fragments from `spec.json`\n- the auto-discovered fragments produced by `auto_simple_bindings.py`\n- the round-trip tests produced by `gen_roundtrip_tests.py`\n\nTo preview only the spec-driven output for one section without touching the\nchecked-in fragments, run `generate_c_api.py` directly with `--header-out` /\n`--source-out` pointing at a scratch path (e.g. under `/tmp`).\n\nTo verify the auto-discovered checked-in output is up to date:\n\n```bash\npython3 tools/c_api_gen/auto_simple_bindings.py --check\n```\n\nTo verify the full checked-in generated set is stable without relying on Git\nworktree metadata:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\n## Maintaining Auto-Managed Families\n\nWhen a new public field is added to an auto-managed family, use this decision\nprocess:\n\n1. If it is a simple scalar, enum, string, or supported chrono field and the\n   desired C API shape matches the existing conventions, do not hand-edit\n   `include/rocksdb/c.h` or `db/c.cc`. Run `python3 tools/c_api_gen/regen_all.py`\n   and let `auto_simple_bindings.py` generate the wrapper.\n2. If the field needs an explicit C API design because of ownership, callbacks,\n   vectors, maps, nested structs, or intentionally different C naming/behavior,\n   keep it out of auto-generation by adding an entry to\n   `tools/c_api_gen/auto_simple_bindings_blocklist.json` with\n   `\"policy\": \"manual\"`.\n3. If the field belongs to an auto-managed family but you intentionally want to\n   postpone C API coverage for a short time, add a blocklist entry with\n   `\"policy\": \"deferred\"` and a concrete reason. Include `tracking_issue` when\n   you have one.\n4. If none of the above applies, the build should fail. Extend\n   `auto_simple_bindings.py`, add a spec-driven wrapper, or add a hand-written\n   wrapper and then update the blocklist policy accordingly.\n\nThe blocklist is intentionally strict:\n\n- each entry must identify the managed family and field\n- each entry must have a non-empty reason\n- policy must be either `manual` or `deferred`\n- stale entries fail regeneration if the field disappears or is renamed\n\nExample deferred entry:\n\n```json\n{\n  \"name\": \"ReadOptions\",\n  \"entries\": [\n    {\n      \"field\": \"future_slice_option\",\n      \"policy\": \"deferred\",\n      \"reason\": \"Needs an explicit C buffer ownership design before exposing it.\",\n      \"tracking_issue\": \"T123456789\"\n    }\n  ]\n}\n```\n\nThe blocklist only applies to the auto-managed families handled by\n`auto_simple_bindings.py`. It is not a substitute for `spec.json`, which still\nowns non-trivial method-style wrappers. It is also unrelated to\n`equivalence_allowlist.json`, which only suppresses intentional diff mismatches\nin the equivalence checker.\n\nTo refresh the full checked-in generated set and confirm nothing changes:\n\n```bash\npython3 tools/c_api_gen/verify_generated_up_to_date.py\n```\n\nTo verify active generated wrappers are equivalent to the handwritten wrappers\nfrom a reference revision:\n\n```bash\npython3 tools/c_api_gen/validate_generated_equivalence.py --ref HEAD\n```\n\nThis checks the generated fragments currently included by\n`include/rocksdb/c.h` and `db/c.cc` against `HEAD:include/rocksdb/c.h` and\n`HEAD:db/c.cc`. Known historical inconsistencies can be documented in\n`equivalence_allowlist.json` with a reason instead of being silently ignored.\n\n## Suggested migration path\n\n1. Start with generated preview fragments only.\n2. Migrate a few low-risk existing wrappers to generated sections.\n3. Keep manual and generated sections clearly separated.\n4. Let auto-discovery pick up new simple public fields automatically.\n5. Extend the spec or keep manual wrappers for complex/manual families.\n\nThis incremental approach minimizes downstream impact while still reducing\nmaintenance burden over time.\n\n<!-- File: tools/cpu_corruption_injector/README.md (Tokens: ~2815 | Category: plugin-manifest) -->\n# CPU Corruption Injector\n\n## Overview\n\nThis tool measures the **outcome distribution** over many `db_stress` test runs.\nIn each `db_stress` test run, a single CPU-register bit-flip is injected into\nexactly one `db_stress` operation (a write, flush, or compaction) running under\n`gdb`. Aggregating over many such runs answers \"when the CPU corrupts one\ninstruction inside that op, how often does RocksDB catch it, crash, silently\nlose/return wrong data, or absorb it with no effect?\".\n\nIt has three layers:\n\n- **Detection** (`db_stress --verify_cpu_corruption_dir`): right after the\n  injected op, `db_stress` reads the whole keyspace back and compares against its\n  expected state, writing any finding to a `data_corruption.*.json` file.\n- **Injection** (`injector*.py`): runs inside `gdb`, navigates to a randomly\n  chosen instance of the op, stops at a random \"critical\" instruction -- one of\n  the two kinds that can carry a fault into data: a **move** carrying a value\n  between CPU and memory (a general-purpose or vector register), or a\n  **branch/jump** (the `eflags` register) -- and flips one random bit in the\n  register it uses. Control registers (`rsp`/`rbp`/`rip`/segment) are left alone.\n- **Orchestration** (`runner*.py`): builds the run set, launches `gdb` per run,\n  classifies each outcome, and aggregates them.\n\n## Requirements\n\n- A `db_stress` binary built with debug info and no inlining, so `gdb` can set\n  breakpoints on the injection-site functions and read their source lines:\n\n  ```bash\n  make DEBUG_LEVEL=0 EXTRA_CXXFLAGS=\"-g -fno-inline\" db_stress\n  ```\n\n- `gdb`. Defaults to `/usr/bin/gdb`; override with the `ICC_GDB` env var if the\n  telemetry's source resolves to `@ ?:0` (a `gdb` too old to read this build's\n  debug info).\n- Optional per-run timeout via the `ICC_RUN_TIMEOUT` env var (seconds, default\n  `600`). One hung `gdb`+`db_stress` cannot block the rest of the set.\n\n## Entry point: `runner.py`\n\nA **campaign** is many `db_stress` test **runs** of one op type. Each run is a\nfull single-threaded `db_stress` test that performs `ops_per_thread` ops, but the\ninjector corrupts exactly **one** op instance of the chosen type in that run\n(e.g. the 51st Put of that run); the run is then classified into a single outcome\nbucket.\n\n- `--op` is one of `write`, `flush`, `compaction`.\n- `--parallel N` runs `N` runs at once (each `db_stress` run is itself\n  single-threaded, so raise this to use more cores).\n- `--seed N` sets the campaign's `base_seed`: run `i` deterministically uses seed\n  `N+i`, which drives both the injection choices and `db_stress`'s own `--seed`, so\n  the whole set is reproducible from `base_seed` alone. Omit `--seed` to draw one\n  fresh random `base_seed` per campaign (chosen once per `runner.py` run and logged as `base_seed=N`); pass that `N` back via `--seed`\n  to replay the set, or `--seed=<N+i>` with `--runs 1` to replay just run `i`.\n\nIn the examples below, `<db_stress>` is the path to the `db_stress` binary you\nbuilt (see [Requirements](#requirements) above -- e.g. `./db_stress`), and\n`<dir>` is a writable directory for the campaign's output.\n\n```bash\n# a compaction campaign of 100 runs\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir>\n\n# a flush campaign of 200 runs, 8 in parallel\npython3 tools/cpu_corruption_injector/runner.py --op flush --runs 200 \\\n    --stress_cmd <db_stress> --report_dir <dir> --parallel 8\n\n# replay an earlier campaign: pass its logged base_seed back as --seed\n# (the runner prints \"reproduce with --seed=<base_seed>\"); base_seed is in [1, 4294967295]\npython3 tools/cpu_corruption_injector/runner.py --op write --runs 100 \\\n    --stress_cmd <db_stress> --report_dir <dir> --seed 3141592653\n```\n\nBefore doing any work, `runner.py` preflights the build: it confirms `gdb` can\nset breakpoints on the op's injection-site functions and read their source\nlines, and fails fast otherwise.\n\n## Outputs\n\nEverything lands under `--report_dir`: two campaign-wide files at the top level,\nplus one `run_XXXXX/` subdirectory per run.\n\n```text\n<report_dir>/\n├── summary.json          # campaign-wide: outcome_counts + a record per run\n├── runner.log            # campaign-wide: runner logging (also echoed to console)\n├── run_00000/            # one subdirectory per run\n│   ├── inject.json                 # what the injector did (WHERE / WHAT / HOW)\n│   ├── data_corruption.<tid>.json  # the finding, only if this run flagged an SDC/corruption\n│   ├── gdb.log                     # this run's gdb output\n│   ├── db/                         # this run's db_stress DB (working dir)\n│   └── exp/                        # this run's expected-values (working dir)\n├── run_00001/\n│   └── ...\n└── ...\n```\n\nSo `summary.json` and `runner.log` are at the top of `--report_dir`; the\nper-run `gdb.log` / `inject.json` / `data_corruption.*.json` live inside each\n`run_XXXXX/`.\n\nOutcome buckets:\n\n- **SDC**: silent data corruption -- the read-back succeeded but returned the\n  wrong result (a lost key, a resurrected key, or a wrong value).\n- **CORRUPTION**: `db_stress` detected a corruption via an integrity check\n  (`Status::Corruption`).\n- **CRASH**: the injected corruption crashed `db_stress` (a fatal signal).\n- **NO_EFFECT**: the corruption landed but the run finished with correct data.\n- **NO_INJECTION**: no bit was flipped this run. The op instance, its\n  `target_fn`, and the instruction to corrupt are all picked **randomly** up\n  front, so a run can occasionally target something it never reaches -- a random\n  op instance beyond the ops this run actually performed, or a\n  critical-instruction index that no later `target_fn` call happens to have.\n  Should be rare; a high count means the injection sites (or the random ranges)\n  need revisiting.\n- **ERROR**: a harness/framework failure, **not** a `db_stress` data outcome --\n  the injector hit a bug, `gdb` died before writing `inject.json`, or the run hit\n  the `ICC_RUN_TIMEOUT` cap. Expected to be **0**; any non-zero count is a\n  framework bug worth investigating.\n\n## Reading a run's output across the 3 layers\n\nEach run threads through all three layers: the injector records what it corrupted\n(`inject.json`), `db_stress` records what the post-op read-back found\n(`data_corruption.<tid>.json`), and the runner rolls every run up into\n`summary.json`. The examples below are from a real 40-run compaction campaign:\n\n```bash\npython3 tools/cpu_corruption_injector/runner.py --op compaction --runs 40 \\\n    --seed 424242 --stress_cmd <db_stress> --report_dir <dir>\n```\n\n**Orchestration layer** -- `summary.json`'s `outcome_counts` (how many of the\ncampaign's runs landed in each bucket), the whole campaign at a glance:\n\n| SDC | CORRUPTION | CRASH | NO_EFFECT | NO_INJECTION | ERROR |\n| --- | ---------- | ----- | --------- | ------------ | ----- |\n|   2 |         10 |     0 |        25 |            3 |     0 |\n\n### A silent data corruption (SDC): `run_00023`\n\n**Injection layer** -- `run_00023/inject.json`: an `eflags` flag-flip on the\ncompaction iterator's key-copy path; the op did NOT crash\n(`db_stress_crash_signal: null`):\n\n```json\n{\n  \"injection_result\": \"injected\",\n  \"db_stress_crash_signal\": null,\n  \"op\": \"compaction\",\n  \"op_index\": 6,\n  \"entry_fn\": \"rocksdb::CompactionJob::Run\",\n  \"target_fn\": \"rocksdb::CompactionIterator::NextFromInput\",\n  \"critical_instruction_index\": 0,\n  \"corruptions\": [\n    {\n      \"instruction\": \"cmp    $0x40,%rdx\",\n      \"register\": \"eflags\",\n      \"corruption_type\": \"flag_flip\",\n      \"before\": \"0x287\",\n      \"after\": \"0x286\",\n      \"details\": {\n        \"source\": \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n        \"call_chain\": [\n          \"__memmove_avx512_unaligned_erms @ ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:299\",\n          \"rocksdb::IterKey::SetKeyImpl @ ./db/dbformat.h:941\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:741\",\n          \"rocksdb::IterKey::SetInternalKey @ ./db/dbformat.h:749\",\n          \"rocksdb::CompactionIterator::NextFromInput @ db/compaction/compaction_iterator.cc:781\"\n        ]\n      }\n    }\n  ],\n  \"ops_seen\": 6,\n  \"critical_instructions_seen\": 1\n}\n```\n\n**Detection layer** -- `run_00023/data_corruption.<tid>.json`: the post-op\nread-back found a committed key missing:\n\n```json\n{\n  \"kind\": \"lost\",\n  \"cf\": 0,\n  \"key\": 202,\n  \"value_from_db\": \"\",\n  \"value_from_expected\": \"010000000504070609080B0A0D0C0F0E\",\n  \"op_status\": \"Get: NotFound\"\n}\n```\n\nReading it: the flag flip mis-copied the compaction output key, dropping key 202\nfrom the output SST. The op returned OK and no checksum fired, but reading key\n202 back returns `NotFound` for a committed key, so the runner classifies the run\n`SDC` (`kind=lost`) -- the bug class this tool exists to surface.\n\n## Auxiliary entry point: `injector.py`\n\n`injector.py` is **not run on its own** -- there is no `python3 injector.py`\nusage. It only works inside `gdb`'s embedded Python (it does `import gdb`), so\n`runner.py` runs it by launching `gdb` with the injector as gdb's script. Each\nrun's invocation looks like:\n\n```bash\ngdb --batch --nx \\\n    -iex 'py import sys; sys.argv=[...]' \\\n    -x tools/cpu_corruption_injector/injector.py \\\n    --args <db_stress> <db_stress flags...>\n```\n\n- `--batch` runs `gdb` non-interactively and exits when the script finishes;\n  `--nx` skips the user's `~/.gdbinit` so their config can't change behavior.\n- `-iex 'py ... sys.argv=[...]'` runs a Python command *before* the script loads,\n  seeding `injector.py`'s `sys.argv` with its parameters (`--op`, `--op_index`,\n  `--entry_fn`, `--target_fn`, `--seed`, `--dir`) -- gdb otherwise hands a `-x`\n  script an empty argv.\n- `-x tools/cpu_corruption_injector/injector.py` is the script `gdb` executes in\n  its embedded Python.\n- `--args <db_stress> <db_stress flags...>` is the program `gdb` launches and\n  debugs -- the `db_stress` binary and its flags, which `gdb` starts, stops\n  mid-op, and corrupts.\n</yakaai_skills>"}