mirror of
https://github.com/facebook/rocksdb.git
synced 2026-10-23 08:09:02 +03:00
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/14985 The Open Source Automated Checkup (T280493780) flagged the 27 generated `c_api_gen/c_generated_*.inc` fragments for missing the required copyright header ("Meta Platforms, Inc. and affiliates"). The fragments are emitted by the C API code generators, none of which wrote a header, so every regeneration reproduced the violation. Root-cause fix in the generators so regenerated output is compliant: - `tools/c_api_gen/generate_c_api.py` (`HEADER_BANNER`) - `tools/c_api_gen/auto_simple_bindings.py` (`auto_header_banner`) - `tools/c_api_gen/gen_roundtrip_tests.py` Each now emits the standard Meta dual-license block (matching `c_base.h` / `include/rocksdb/c.h`) ahead of the `// generated` marker, and the 27 checked-in `.inc` fragments are regenerated accordingly. The assembled `include/rocksdb/c.h` and `db/c.cc` already carry a top-level header, so `regen_all.py`'s inliner now strips each fragment's license block when inlining to avoid repeating it once per fragment; those two files are therefore unchanged. Also adds the header to `tools/gtest_parallel_repro.py`, the one non-`.inc` source file flagged by the checkup. Reviewed By: pdillinger Differential Revision: D113242908 fbshipit-source-id: 4d81d1355c8d8a35cbc4377dd9b21df901ad3cb7
44 lines
1.8 KiB
C++
44 lines
1.8 KiB
C++
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
// This source code is licensed under both the GPLv2 (found in the
|
|
// COPYING file in the root directory) and Apache 2.0 License
|
|
// (found in the LICENSE.Apache file in the root directory).
|
|
// @generated
|
|
// -----------------------------------------------------------------------------
|
|
// Auto-generated by tools/c_api_gen/generate_c_api.py.
|
|
// DO NOT EDIT THIS FILE DIRECTLY.
|
|
// Source: tools/c_api_gen/spec.json
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// To regenerate this file:
|
|
// python3 tools/c_api_gen/generate_c_api.py
|
|
// --spec tools/c_api_gen/spec.json --section 'BlockBasedOptions simple'
|
|
// --header-out
|
|
// c_api_gen/c_generated_block_based_options_subset.h.inc
|
|
// --source-out
|
|
// c_api_gen/c_generated_block_based_options_subset.cc.inc
|
|
|
|
/* BlockBasedOptions simple */
|
|
|
|
void rocksdb_block_based_options_set_data_block_hash_ratio(
|
|
rocksdb_block_based_table_options_t* options, double v) {
|
|
options->rep.data_block_hash_table_util_ratio = v;
|
|
}
|
|
|
|
void rocksdb_block_based_options_set_top_level_index_pinning_tier(
|
|
rocksdb_block_based_table_options_t* options, int v) {
|
|
options->rep.metadata_cache_options.top_level_index_pinning =
|
|
static_cast<ROCKSDB_NAMESPACE::PinningTier>(v);
|
|
}
|
|
|
|
void rocksdb_block_based_options_set_partition_pinning_tier(
|
|
rocksdb_block_based_table_options_t* options, int v) {
|
|
options->rep.metadata_cache_options.partition_pinning =
|
|
static_cast<ROCKSDB_NAMESPACE::PinningTier>(v);
|
|
}
|
|
|
|
void rocksdb_block_based_options_set_unpartitioned_pinning_tier(
|
|
rocksdb_block_based_table_options_t* options, int v) {
|
|
options->rep.metadata_cache_options.unpartitioned_pinning =
|
|
static_cast<ROCKSDB_NAMESPACE::PinningTier>(v);
|
|
}
|