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
241 lines
7.6 KiB
C++
241 lines
7.6 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/auto_simple_bindings.py.
|
|
// DO NOT EDIT THIS FILE DIRECTLY.
|
|
// Sources:
|
|
// - include/rocksdb/options.h
|
|
// - tools/c_api_gen/auto_simple_bindings_blocklist.json
|
|
// - include/rocksdb/c.h
|
|
// - tools/c_api_gen/c_base.cc
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// To regenerate this file:
|
|
// python3 tools/c_api_gen/auto_simple_bindings.py
|
|
|
|
// Output group: Auto-discovered ReadOptions simple
|
|
|
|
/* ReadOptions */
|
|
|
|
void rocksdb_readoptions_set_deadline(rocksdb_readoptions_t* opt,
|
|
uint64_t microseconds) {
|
|
opt->rep.deadline = std::chrono::microseconds(microseconds);
|
|
}
|
|
|
|
uint64_t rocksdb_readoptions_get_deadline(rocksdb_readoptions_t* opt) {
|
|
return opt->rep.deadline.count();
|
|
}
|
|
|
|
void rocksdb_readoptions_set_io_timeout(rocksdb_readoptions_t* opt,
|
|
uint64_t microseconds) {
|
|
opt->rep.io_timeout = std::chrono::microseconds(microseconds);
|
|
}
|
|
|
|
uint64_t rocksdb_readoptions_get_io_timeout(rocksdb_readoptions_t* opt) {
|
|
return opt->rep.io_timeout.count();
|
|
}
|
|
|
|
void rocksdb_readoptions_set_read_tier(rocksdb_readoptions_t* opt, int v) {
|
|
opt->rep.read_tier = static_cast<decltype(opt->rep.read_tier)>(v);
|
|
}
|
|
|
|
int rocksdb_readoptions_get_read_tier(rocksdb_readoptions_t* opt) {
|
|
return static_cast<int>(opt->rep.read_tier);
|
|
}
|
|
|
|
void rocksdb_readoptions_set_rate_limiter_priority(rocksdb_readoptions_t* opt,
|
|
int v) {
|
|
opt->rep.rate_limiter_priority =
|
|
static_cast<decltype(opt->rep.rate_limiter_priority)>(v);
|
|
}
|
|
|
|
int rocksdb_readoptions_get_rate_limiter_priority(rocksdb_readoptions_t* opt) {
|
|
return static_cast<int>(opt->rep.rate_limiter_priority);
|
|
}
|
|
|
|
void rocksdb_readoptions_set_value_size_soft_limit(rocksdb_readoptions_t* opt,
|
|
uint64_t v) {
|
|
opt->rep.value_size_soft_limit = v;
|
|
}
|
|
|
|
uint64_t rocksdb_readoptions_get_value_size_soft_limit(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.value_size_soft_limit;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_verify_checksums(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.verify_checksums = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_verify_checksums(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.verify_checksums;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_fill_cache(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.fill_cache = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_fill_cache(rocksdb_readoptions_t* opt) {
|
|
return opt->rep.fill_cache;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_ignore_range_deletions(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.ignore_range_deletions = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_ignore_range_deletions(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.ignore_range_deletions;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_async_io(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.async_io = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_async_io(rocksdb_readoptions_t* opt) {
|
|
return opt->rep.async_io;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_optimize_multiget_for_io(
|
|
rocksdb_readoptions_t* opt, unsigned char v) {
|
|
opt->rep.optimize_multiget_for_io = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_optimize_multiget_for_io(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.optimize_multiget_for_io;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_readahead_size(rocksdb_readoptions_t* opt,
|
|
size_t v) {
|
|
opt->rep.readahead_size = v;
|
|
}
|
|
|
|
size_t rocksdb_readoptions_get_readahead_size(rocksdb_readoptions_t* opt) {
|
|
return opt->rep.readahead_size;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_max_skippable_internal_keys(
|
|
rocksdb_readoptions_t* opt, uint64_t v) {
|
|
opt->rep.max_skippable_internal_keys = v;
|
|
}
|
|
|
|
uint64_t rocksdb_readoptions_get_max_skippable_internal_keys(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.max_skippable_internal_keys;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_tailing(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.tailing = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_tailing(rocksdb_readoptions_t* opt) {
|
|
return opt->rep.tailing;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_total_order_seek(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.total_order_seek = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_total_order_seek(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.total_order_seek;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_auto_prefix_mode(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.auto_prefix_mode = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_auto_prefix_mode(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.auto_prefix_mode;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_prefix_same_as_start(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.prefix_same_as_start = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_prefix_same_as_start(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.prefix_same_as_start;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_pin_data(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.pin_data = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_pin_data(rocksdb_readoptions_t* opt) {
|
|
return opt->rep.pin_data;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_adaptive_readahead(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.adaptive_readahead = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_adaptive_readahead(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.adaptive_readahead;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_background_purge_on_iterator_cleanup(
|
|
rocksdb_readoptions_t* opt, unsigned char v) {
|
|
opt->rep.background_purge_on_iterator_cleanup = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_background_purge_on_iterator_cleanup(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.background_purge_on_iterator_cleanup;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_auto_readahead_size(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.auto_readahead_size = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_auto_readahead_size(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.auto_readahead_size;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_allow_unprepared_value(rocksdb_readoptions_t* opt,
|
|
unsigned char v) {
|
|
opt->rep.allow_unprepared_value = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_allow_unprepared_value(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.allow_unprepared_value;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_auto_refresh_iterator_with_snapshot(
|
|
rocksdb_readoptions_t* opt, unsigned char v) {
|
|
opt->rep.auto_refresh_iterator_with_snapshot = v;
|
|
}
|
|
|
|
unsigned char rocksdb_readoptions_get_auto_refresh_iterator_with_snapshot(
|
|
rocksdb_readoptions_t* opt) {
|
|
return opt->rep.auto_refresh_iterator_with_snapshot;
|
|
}
|
|
|
|
void rocksdb_readoptions_set_io_activity(rocksdb_readoptions_t* opt, int v) {
|
|
opt->rep.io_activity = static_cast<decltype(opt->rep.io_activity)>(v);
|
|
}
|
|
|
|
int rocksdb_readoptions_get_io_activity(rocksdb_readoptions_t* opt) {
|
|
return static_cast<int>(opt->rep.io_activity);
|
|
}
|