Skip to content

Commit

Permalink
missing options
Browse files Browse the repository at this point in the history
  • Loading branch information
hx235 committed Mar 8, 2024
1 parent 13ef21c commit 34e95f8
Show file tree
Hide file tree
Showing 22 changed files with 827 additions and 18 deletions.
6 changes: 6 additions & 0 deletions ci_job.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
for test in fbcode_blackbox_crash_test fbcode_asan_blackbox_crash_test fbcode_tsan_blackbox_crash_test fbcode_whitebox_crash_test fbcode_asan_whitebox_crash_test fbcode_tsan_whitebox_crash_test crash_test asan_crash_test clang_ubsan_crash_test tsan_crash_test coerce_context_switch_crash_test fbcode_crash_test_with_txn fbcode_crash_test_with_ts fbcode_crash_test_with_tiered_storage fbcode_crash_test_with_best_efforts_recovery fbcode_crash_test_with_optimistic_txn fbcode_crash_test_with_multiops_wp_txn fbcode_crash_test_with_multiops_wc_txn fbcode_crash_test_with_atomic_flush secondary_cache_crash_test
do
arc skycastle schedule ../tools/skycastle/workflows2/rocksdb_point_of_contact/rocksdb-contrun.sky:main --flag test_name=$test
arc skycastle schedule ../tools/skycastle/workflows2/rocksdb_point_of_contact/rocksdb-contrun.sky:main --flag test_name=$test
arc skycastle schedule ../tools/skycastle/workflows2/rocksdb_point_of_contact/rocksdb-contrun.sky:main --flag test_name=$test
done
46 changes: 46 additions & 0 deletions db_stress_tool/db_stress_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// NOTE that if FLAGS_test_batches_snapshots is set, the test will have
// different behavior. See comment of the flag for details.

#include <gflags/gflags_declare.h>
#ifdef GFLAGS
#pragma once
#include <fcntl.h>
Expand Down Expand Up @@ -352,6 +353,51 @@ DECLARE_uint64(initial_auto_readahead_size);
DECLARE_uint64(max_auto_readahead_size);
DECLARE_uint64(num_file_reads_for_auto_readahead);
DECLARE_bool(auto_readahead_size);
DECLARE_bool(allow_fallocate);
DECLARE_int32(table_cache_numshardbits);
DECLARE_bool(is_fd_close_on_exec);
DECLARE_bool(enable_write_thread_adaptive_yield);
DECLARE_uint32(lowest_used_cache_tier);
DECLARE_uint64(log_readahead_size);
DECLARE_uint64(bgerror_resume_retry_interval);
DECLARE_uint64(delete_obsolete_files_period_micros);
DECLARE_uint64(max_log_file_size);
DECLARE_uint64(log_file_time_to_roll);
DECLARE_bool(use_adaptive_mutex);
DECLARE_bool(advise_random_on_open);
DECLARE_uint64(WAL_ttl_seconds);
DECLARE_uint64(WAL_size_limit_MB);
DECLARE_bool(strict_bytes_per_sync);
DECLARE_bool(avoid_flush_during_shutdown);
DECLARE_bool(fill_cache);
DECLARE_bool(optimize_multiget_for_io);
DECLARE_bool(low_pri);
DECLARE_bool(memtable_insert_hint_per_batch);
DECLARE_bool(dump_malloc_stats);
DECLARE_bool(persist_stats_to_disk);
DECLARE_uint32(stats_history_buffer_size);
DECLARE_bool(skip_stats_update_on_db_open);
DECLARE_bool(optimize_filters_for_hits);
DECLARE_uint64(sample_for_compression);
DECLARE_bool(report_bg_io_stats);
DECLARE_bool(cache_index_and_filter_blocks_with_high_priority);
DECLARE_bool(no_block_cache);
DECLARE_bool(use_delta_encoding);
DECLARE_bool(verify_compression);
DECLARE_uint32(read_amp_bytes_per_bit);
DECLARE_bool(enable_index_compression);
DECLARE_bool(block_align);
DECLARE_uint32(index_shortening);
DECLARE_bool(strict_capacity_limit);
DECLARE_uint32(metadata_charge_policy);
DECLARE_bool(use_adaptive_mutex_lru);
DECLARE_uint32(compress_format_version);
DECLARE_bool(enable_custom_split_merge);
DECLARE_uint64(manifest_preallocation_size);
DECLARE_bool(checksum_handoff_file);
DECLARE_uint64(max_total_wal_size);
DECLARE_double(high_pri_pool_ratio);
DECLARE_double(low_pri_pool_ratio);

constexpr long KB = 1024;
constexpr int kRandomValueMaxFactor = 3;
Expand Down
184 changes: 183 additions & 1 deletion db_stress_tool/db_stress_gflags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include <gflags/gflags.h>

#include "rocksdb/cache.h"
#include "rocksdb/options.h"
#include "rocksdb/utilities/backup_engine.h"
#ifdef GFLAGS
#include "db_stress_tool/db_stress_common.h"

Expand Down Expand Up @@ -402,7 +407,8 @@ DEFINE_double(experimental_mempurge_threshold, 0.0,
"Maximum estimated useful payload that triggers a "
"mempurge process to collect memtable garbage bytes.");

DEFINE_bool(enable_write_thread_adaptive_yield, true,
DEFINE_bool(enable_write_thread_adaptive_yield,
ROCKSDB_NAMESPACE::Options().enable_write_thread_adaptive_yield,
"Use a yielding spin loop for brief writer thread waits.");

// Options for StackableDB-based BlobDB
Expand Down Expand Up @@ -1144,4 +1150,180 @@ DEFINE_uint32(bottommost_file_compaction_delay, 0,
DEFINE_bool(auto_readahead_size, false,
"Does auto tuning of readahead_size when enabled during scans.");

DEFINE_bool(allow_fallocate, ROCKSDB_NAMESPACE::Options().allow_fallocate,
"Options.allow_fallocate");

DEFINE_int32(table_cache_numshardbits,
ROCKSDB_NAMESPACE::Options().table_cache_numshardbits,
"Options.table_cache_numshardbits");

DEFINE_bool(is_fd_close_on_exec,
ROCKSDB_NAMESPACE::Options().is_fd_close_on_exec,
"Options.is_fd_close_on_exec");

DEFINE_uint32(
lowest_used_cache_tier,
static_cast<uint32_t>(ROCKSDB_NAMESPACE::Options().lowest_used_cache_tier),
"Options.lowest_used_cache_tier");

DEFINE_uint64(log_readahead_size,
ROCKSDB_NAMESPACE::Options().log_readahead_size,
"Options.log_readahead_size");

DEFINE_uint64(bgerror_resume_retry_interval,
ROCKSDB_NAMESPACE::Options().bgerror_resume_retry_interval,
"Options.bgerror_resume_retry_interval");

DEFINE_uint64(delete_obsolete_files_period_micros,
ROCKSDB_NAMESPACE::Options().delete_obsolete_files_period_micros,
"Options.delete_obsolete_files_period_micros");

DEFINE_uint64(max_log_file_size, ROCKSDB_NAMESPACE::Options().max_log_file_size,
"Options.max_log_file_sizes");

DEFINE_uint64(log_file_time_to_roll,
ROCKSDB_NAMESPACE::Options().log_file_time_to_roll,
"Options.log_file_time_to_roll");

DEFINE_bool(use_adaptive_mutex, ROCKSDB_NAMESPACE::Options().use_adaptive_mutex,
"Options.use_adaptive_mutex");

DEFINE_bool(advise_random_on_open,
ROCKSDB_NAMESPACE::Options().advise_random_on_open,
"Options.advise_random_on_open");

DEFINE_uint64(WAL_ttl_seconds, ROCKSDB_NAMESPACE::Options().WAL_ttl_seconds,
"Options.WAL_ttl_seconds");

DEFINE_uint64(WAL_size_limit_MB, ROCKSDB_NAMESPACE::Options().WAL_size_limit_MB,
"Options.WAL_size_limit_MB");

DEFINE_bool(strict_bytes_per_sync,
ROCKSDB_NAMESPACE::Options().strict_bytes_per_sync,
"Options.strict_bytes_per_sync");

DEFINE_bool(avoid_flush_during_shutdown,
ROCKSDB_NAMESPACE::Options().avoid_flush_during_shutdown,
"Options.avoid_flush_during_shutdown");

DEFINE_bool(fill_cache, ROCKSDB_NAMESPACE::ReadOptions().fill_cache,
"ReadOptions.fill_cache");

DEFINE_bool(optimize_multiget_for_io,
ROCKSDB_NAMESPACE::ReadOptions().optimize_multiget_for_io,
"ReadOptions.optimize_multiget_for_io");

DEFINE_bool(low_pri, ROCKSDB_NAMESPACE::WriteOptions().low_pri,
"WriteOptions.low_pri");

DEFINE_bool(memtable_insert_hint_per_batch,
ROCKSDB_NAMESPACE::WriteOptions().memtable_insert_hint_per_batch,
"WriteOptions.memtable_insert_hint_per_batch");

DEFINE_bool(dump_malloc_stats, ROCKSDB_NAMESPACE::Options().dump_malloc_stats,
"Options.dump_malloc_stats");

DEFINE_bool(persist_stats_to_disk,
ROCKSDB_NAMESPACE::Options().persist_stats_to_disk,
"Options.persist_stats_to_disk");

DEFINE_uint32(stats_history_buffer_size,
ROCKSDB_NAMESPACE::Options().stats_history_buffer_size,
"Options.stats_history_buffer_size");

DEFINE_bool(skip_stats_update_on_db_open,
ROCKSDB_NAMESPACE::Options().skip_stats_update_on_db_open,
"Options.skip_stats_update_on_db_open");

DEFINE_bool(optimize_filters_for_hits,
ROCKSDB_NAMESPACE::Options().optimize_filters_for_hits,
"Options.optimize_filters_for_hits");

DEFINE_uint64(sample_for_compression,
ROCKSDB_NAMESPACE::Options().sample_for_compression,
"Options.sample_for_compression");

DEFINE_bool(report_bg_io_stats, ROCKSDB_NAMESPACE::Options().report_bg_io_stats,
"Options.report_bg_io_stats");

DEFINE_bool(
cache_index_and_filter_blocks_with_high_priority,
ROCKSDB_NAMESPACE::BlockBasedTableOptions()
.cache_index_and_filter_blocks_with_high_priority,
"BlockBasedTableOptions.cache_index_and_filter_blocks_with_high_priority");

DEFINE_bool(no_block_cache,
ROCKSDB_NAMESPACE::BlockBasedTableOptions().no_block_cache,
"BlockBasedTableOptions.no_block_cache");

DEFINE_bool(use_delta_encoding,
ROCKSDB_NAMESPACE::BlockBasedTableOptions().use_delta_encoding,
"BlockBasedTableOptions.use_delta_encoding");

DEFINE_bool(verify_compression,
ROCKSDB_NAMESPACE::BlockBasedTableOptions().verify_compression,
"BlockBasedTableOptions.verify_compression");

DEFINE_uint32(
read_amp_bytes_per_bit,
ROCKSDB_NAMESPACE::BlockBasedTableOptions().read_amp_bytes_per_bit,
"Options.read_amp_bytes_per_bit");

DEFINE_bool(
enable_index_compression,
ROCKSDB_NAMESPACE::BlockBasedTableOptions().enable_index_compression,
"BlockBasedTableOptions.enable_index_compression");

DEFINE_bool(block_align,
ROCKSDB_NAMESPACE::BlockBasedTableOptions().block_align,
"BlockBasedTableOptions.block_align");

DEFINE_uint32(index_shortening,
static_cast<uint32_t>(
ROCKSDB_NAMESPACE::BlockBasedTableOptions().index_shortening),
"BlockBasedTableOptions.index_shortening");

DEFINE_bool(strict_capacity_limit,
ROCKSDB_NAMESPACE::ShardedCacheOptions().strict_capacity_limit,
"ShardedCacheOptions.strict_capacity_limit");

DEFINE_uint32(metadata_charge_policy,
static_cast<uint32_t>(ROCKSDB_NAMESPACE::ShardedCacheOptions()
.metadata_charge_policy),
"ShardedCacheOptions.metadata_charge_policy");

DEFINE_bool(use_adaptive_mutex_lru,
ROCKSDB_NAMESPACE::LRUCacheOptions().use_adaptive_mutex,
"LRUCacheOptions.use_adaptive_mutex");

DEFINE_uint32(
compress_format_version,
static_cast<uint32_t>(ROCKSDB_NAMESPACE::CompressedSecondaryCacheOptions()
.compress_format_version),
"CompressedSecondaryCacheOptions.compress_format_version");

DEFINE_bool(enable_custom_split_merge,
ROCKSDB_NAMESPACE::CompressedSecondaryCacheOptions()
.enable_custom_split_merge,
"CompressedSecondaryCacheOptions.enable_custom_split_merge");

DEFINE_uint64(manifest_preallocation_size,
ROCKSDB_NAMESPACE::Options().manifest_preallocation_size,
"Options.manifest_preallocation_size");

DEFINE_uint64(max_total_wal_size,
ROCKSDB_NAMESPACE::Options().max_total_wal_size,
"Options.max_total_wal_size");

DEFINE_bool(checksum_handoff_file, false,
"If true, include all the supported files in "
"Options.checksum_handoff_file. Otherwise include no files.");

DEFINE_double(high_pri_pool_ratio,
ROCKSDB_NAMESPACE::LRUCacheOptions().high_pri_pool_ratio,
"LRUCacheOptions.high_pri_pool_ratio");

DEFINE_double(low_pri_pool_ratio,
ROCKSDB_NAMESPACE::LRUCacheOptions().low_pri_pool_ratio,
"LRUCacheOptions.low_pri_pool_ratio");
#endif // GFLAGS
Loading

0 comments on commit 34e95f8

Please sign in to comment.