Repository Analysis

facebook/rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.

7.2 Low AI signal View on GitHub
7.2
Adjusted Score
7.2
Raw Score
100%
Time Factor
2026-05-29
Last Push
31,711
Stars
C++
Language
315,850
Lines of Code
1230
Files
2465
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 2MEDIUM 41LOW 2422

Pattern Findings

2465 matches across 11 categories. Click a row to expand file-level details.

Over-Commented Block2276 hits · 1987 pts
SeverityFileLineSnippet
LOWCMakeLists.txt1# Prerequisites for Windows:
LOWCMakeLists.txt21#
LOWoptions/options_helper.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWoptions/configurable_test.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWoptions/cf_options.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWoptions/cf_options.h301 bool strict_max_successive_merges;
LOWoptions/configurable_helper.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWoptions/configurable_helper.h21class ConfigurableHelper {
LOWoptions/configurable_helper.h41 // @return InvalidArgument If any of the values cannot be successfully
LOWoptions/configurable_helper.h61 // @return NotSupported If the option was found but no rule for converting
LOWoptions/configurable_helper.h81 // equivalent.
LOWoptions/configurable_helper.h101 // equivalent.
LOWoptions/configurable_helper.h121 // @param InvalidArgument If the name is valid for this object but
LOWoptions/configurable_helper.h141 // Internal method to list the option names for this object.
LOWoptions/configurable_helper.h161
LOWtools/trace_analyzer_tool.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWtools/regression_test.sh1#!/usr/bin/env bash
LOWtools/regression_test.sh21# TEST_PATH=/my/output/dir COMMIT_ID=abcdef ./tools/regression_test.sh
LOWtools/regression_test.sh41# exists
LOWtools/regression_test.sh61# this feature only work for commits after 88acd93 or rocksdb version
LOWtools/regression_test.sh81# HISTOGRAM: If 1, then the histogram feature on performance feature is on.
LOWtools/tsan_suppressions.txt1# ThreadSanitizer suppressions for known third-party false positives.
LOWtools/check_format_compatible.sh1#!/usr/bin/env bash
LOWtools/run_leveldb.sh1#!/usr/bin/env bash
LOWtools/run_leveldb.sh21# Were list-of-threads specified as "1 2 4" then the tests in steps 2, 3 and
LOWtools/run_blob_bench.sh1#!/usr/bin/env bash
LOWtools/analyze_txn_stress_test.sh1#!/bin/bash
LOWtools/db_crashtest.py121# default_params < {blackbox,whitebox}_default_params <
LOWtools/db_crashtest.py181 "delpercent": 4,
LOWtools/db_crashtest.py961 # Remote file systems such as Warm Storage do not guarantee that writes from
LOWtools/db_crashtest.py1101 dest_params["inplace_update_support"] = 0
LOWtools/db_crashtest.py1141 # filters are not compatible with the UDI wrapper layout.
LOWtools/db_crashtest.py1181 # inplace_update_support does not update sequence number. Our stress test recovery
LOWtools/db_crashtest.py1421 # 1. Reopen with WAL currently requires persisting WAL data before closing for reopen.
LOWtools/run_flash_bench.sh1#!/usr/bin/env bash
LOWtools/run_flash_bench.sh21# Test output is written to $OUTPUT_DIR, currently /tmp/output. The performance
LOWtools/run_flash_bench.sh41# do range queries.
LOWtools/simulated_hybrid_file_system.h1// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
LOWtools/advisor/advisor/db_timeseries_parser.py61 return
LOWtools/advisor/advisor/db_stats_fetcher.py61 else:
LOWtools/advisor/advisor/db_options_parser.py341 # Trigger for an OptionCondition object is of the form:
LOWtools/advisor/advisor/rules.ini1# Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h161 // a block, and aggregates the information by block type, sst file, and column
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h181 // Block Type UncompressionDict: Number of accesses: 2
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h201 // Write the percentage of accesses break down by column family into a csv
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h221 //
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h241 // "time,label_1_access_per_second,label_2_access_per_second,...,label_N_access_per_second"
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h261 bool user_access_only) const;
LOWtools/block_cache_analyzer/block_cache_trace_analyzer.h281 // Write the reuse lifetime into a csv file saved in 'output_dir'. Reuse
LOWtools/block_cache_analyzer/block_cache_pysim.sh1#!/usr/bin/env bash
LOWtools/block_cache_analyzer/__init__.py1#!/usr/bin/env python3
LOWmemory/memory_usage.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWmemory/allocator.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWmemory/jemalloc_nodump_allocator.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWmemory/concurrent_arena.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWmemory/concurrent_arena.h21#include "util/thread_local.h"
LOWmemory/arena.h1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
LOWmemory/arena.h41 // page TLB first. If allocation fails, will fall back to normal case.
LOWcache/typed_cache.h1// Copyright (c) Meta Platforms, Inc. and affiliates.
2216 more matches not shown…
Hyper-Verbose Identifiers66 hits · 72 pts
SeverityFileLineSnippet
LOWtools/db_crashtest_test.py76 def test_stress_cmd_env_defaults_tsan_suppressions(self):
LOWtools/db_crashtest_test.py90 def test_stress_cmd_env_preserves_tsan_options(self):
LOWtools/db_crashtest_test.py98 def test_get_ev_parent_dir_preserves_existing_contents(self):
LOWtools/db_crashtest_test.py111 def test_finalize_disables_test_batches_snapshots_when_disable_wal(self):
LOWtools/db_crashtest_test.py123 def test_finalize_disables_test_batches_snapshots_for_blob_direct_write(self):
LOWtools/db_crashtest_test.py141 def test_finalize_disables_sqfc_range_queries_with_range_conversion(self):
LOWtools/db_crashtest_test.py158 def test_strip_expected_sigterm_stderr_suppresses_only_known_lines(self):
LOWtools/db_crashtest_test.py180 def test_strip_expected_sigterm_stderr_suppresses_retryable_wait_cqe(self):
LOWtools/db_crashtest_test.py201 def test_strip_expected_sigterm_stderr_preserves_terminal_wait_cqe(self):
LOWtools/db_crashtest_test.py215 def test_strip_expected_sigterm_stderr_preserves_other_stderr(self):
LOWtools/db_crashtest_test.py237 def test_strip_expected_sigterm_stderr_requires_timeout_and_sigterm_marker(self):
LOWtools/db_crashtest_test.py256 def test_output_matches_no_space_catches_known_failure_strings(self):
LOWtools/db_crashtest_test.py281 def test_file_type_suffix_preserves_compound_suffixes(self):
LOWtools/db_crashtest_test.py289 def test_finalize_sanitizes_incompatible_flags_for_multi_db(self):
LOWtools/db_crashtest_test.py305 def test_finalize_preserves_flags_for_single_db(self):
LOWtools/db_crashtest_test.py319 def test_build_out_of_space_diagnostics_summarizes_directory_suffixes(self):
LOWtools/run_clang_tidy.py128def parse_diff_for_changed_lines(diff_text):
LOWtools/run_clang_tidy.py303def _format_diagnostic_counts(diagnostic_lines):
LOWtools/run_clang_tidy.py369def write_github_step_summary(warning_lines, by_check, wall_time, repo_root):
LOWtools/db_crashtest.py71def early_argument_parsing_before_main():
LOWtools/db_crashtest.py106def apply_random_seed_per_iteration():
LOWtools/db_crashtest.py575def setup_multiops_txn_key_spaces_file():
LOWtools/db_crashtest.py1905def build_out_of_space_diagnostics(
LOWtools/db_crashtest.py1970def print_output_and_exit_on_error(
LOWtools/db_crashtest.py1991def print_run_output_and_exit_on_error(args, finalized_params, stdout, stderr):
LOWtools/db_crashtest.py2000def strip_expected_sigterm_stderr(stdout, stderr, hit_timeout):
LOWtools/db_crashtest.py2051def print_and_cleanup_fault_injection_log(pid):
LOWtools/advisor/advisor/db_timeseries_parser.py123 def check_and_trigger_conditions(self, conditions):
LOWtools/advisor/advisor/db_timeseries_parser.py167 def handle_evaluate_expression(self, condition, statistics, entities):
LOWtools/advisor/advisor/db_bench_runner.py140 def _get_options_command_line_args_str(self, curr_options):
LOWtools/advisor/advisor/db_bench_runner.py155 def _setup_db_before_experiment(self, curr_options, db_path):
LOWtools/advisor/advisor/db_bench_runner.py170 def _build_experiment_command(self, curr_options, db_path):
LOWtools/advisor/advisor/db_options_parser.py284 def check_and_trigger_conditions(self, conditions):
LOWtools/advisor/advisor/rule_parser.py117 def get_trigger_column_families(self):
LOWtools/advisor/advisor/db_log_parser.py27 def check_and_trigger_conditions(self, conditions):
LOWtools/advisor/advisor/db_log_parser.py99 def trigger_conditions_for_log(self, conditions, log):
LOWtools/advisor/advisor/db_log_parser.py113 def check_and_trigger_conditions(self, conditions):
LOWtools/advisor/test/test_rule_parser.py56 def test_triggered_conditions(self):
LOWtools/advisor/test/test_rule_parser.py112 def test_condition_conjunctions(self):
LOWtools/advisor/test/test_rule_parser.py162 def test_rule_missing_suggestions(self):
LOWtools/advisor/test/test_rule_parser.py167 def test_rule_missing_conditions(self):
LOWtools/advisor/test/test_rule_parser.py172 def test_condition_missing_regex(self):
LOWtools/advisor/test/test_rule_parser.py177 def test_condition_missing_options(self):
LOWtools/advisor/test/test_rule_parser.py182 def test_condition_missing_expression(self):
LOWtools/advisor/test/test_rule_parser.py187 def test_suggestion_missing_option(self):
LOWtools/advisor/test/test_rule_parser.py192 def test_suggestion_missing_description(self):
LOWtools/advisor/test/test_rule_parser.py202 def test_condition_missing_source(self):
LOWtools/advisor/test/test_rule_parser.py209 def test_suggestion_missing_action(self):
LOWtools/advisor/test/test_db_bench_runner.py34 def test_get_info_log_file_name(self):
LOWtools/advisor/test/test_db_bench_runner.py73 def test_build_experiment_command(self):
LOWtools/advisor/test/test_db_stats_fetcher.py34 def test_check_and_trigger_conditions_bursty(self):
LOWtools/advisor/test/test_db_stats_fetcher.py50 def test_check_and_trigger_conditions_eval_agg(self):
LOWtools/advisor/test/test_db_stats_fetcher.py74 def test_check_and_trigger_conditions_eval(self):
LOWtools/advisor/test/test_db_stats_fetcher.py99 def test_unaccumulate_metrics(self):
LOWtools/advisor/test/test_db_log_parser.py58 def test_check_and_trigger_conditions(self):
LOWtools/advisor/test/test_db_options_parser.py148 def test_generate_options_config(self):
LOWtools/advisor/test/test_db_options_parser.py154 def test_check_and_trigger_conditions(self):
LOWtools/block_cache_analyzer/block_cache_pysim.py380 def write_miss_ratio_timeline(
LOWtools/block_cache_analyzer/block_cache_pysim.py460 def write_policy_ratio_timeline(
LOW…lock_cache_analyzer/block_cache_trace_analyzer_plot.py93def plot_miss_stats_diff_lru_graphs(
6 more matches not shown…
AI Slop Vocabulary18 hits · 52 pts
SeverityFileLineSnippet
LOWtools/benchmark.sh749 # doesn't output regular statistics then we'll just use the time command to
MEDIUMtools/advisor/advisor/ini_parser.py27 # A section header looks like: [Rule "my-new-rule"]. Essentially,
MEDIUMutil/ribbon_alg.h95// By contrast Bloom filters utilize an "AND" construction: a query only
MEDIUMutil/ribbon_alg.h889// effectively utilize any size space (multiple of CoeffRow) for minimizing
MEDIUMinclude/rocksdb/merge_operator.h26// Essentially, a MergeOperator specifies the SEMANTICS of a merge, which only
MEDIUMinclude/rocksdb/memory_allocator.h65// Generate memory allocator which allocates through Jemalloc and utilize
MEDIUMinclude/rocksdb/options.h1740 // competing with read and write operations during peak hours. Essentially, we
MEDIUMinclude/rocksdb/compression_type.h289 // Essentially specifies a minimum acceptable compression ratio. A block is
MEDIUMinclude/rocksdb/experimental.h250// * Point queries can utilize essentially any kind of filter by extracting
MEDIUMutilities/persistent_cache/persistent_cache_tier.h23// is a generic design and can leverage any storage medium -- disk/SSD/NVM/RAM.
MEDIUMtable/block_based/filter_policy_internal.h200 // Essentially for testing only: configured millibits/key
MEDIUMtable/block_based/filter_policy_internal.h202 // Essentially for testing only: legacy whole bits/key
MEDIUMtable/block_based/filter_policy_internal.h246 // State for implementing optimize_filters_for_memory. Essentially, this
MEDIUMdb/c_test.c1941 // Essentially a fingerprint of full Bloom schema, format_version=5
MEDIUMdb/c_test.c1944 // Essentially a fingerprint of Ribbon schema
MEDIUMthird-party/gtest-1.8.1/fused-src/gtest/gtest.h9648// This implementation is *not* meant to be as highly tuned or robust
MEDIUMthird-party/gtest-1.8.1/fused-src/gtest/gtest.h9721// In practice, this can be used to test functions that utilize the
MEDIUMport/win/io_win.h304// we utilize the original buffer as an alignment buffer to write directly to
Decorative Section Separators13 hits · 45 pts
SeverityFileLineSnippet
MEDIUMtools/regression_test.sh99#==============================================================================
MEDIUMtools/regression_test.sh101#==============================================================================
MEDIUMtools/regression_test.sh120#==============================================================================
MEDIUMtools/run_clang_tidy.py515 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py517 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py534 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py536 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py554 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py556 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py600 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py602 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py608 # ------------------------------------------------------------------
MEDIUMtools/run_clang_tidy.py610 # ------------------------------------------------------------------
Deep Nesting44 hits · 44 pts
SeverityFileLineSnippet
LOWtools/benchmark_ci.py55
LOWtools/run_clang_tidy.py156
LOWtools/run_clang_tidy.py315
LOWtools/run_clang_tidy.py435
LOWtools/write_stress_runner.py25
LOWtools/db_crashtest.py924
LOWtools/db_crashtest.py2051
LOWtools/db_crashtest.py2174
LOWtools/advisor/advisor/db_timeseries_parser.py47
LOWtools/advisor/advisor/db_timeseries_parser.py98
LOWtools/advisor/advisor/db_timeseries_parser.py123
LOWtools/advisor/advisor/db_timeseries_parser.py167
LOWtools/advisor/advisor/db_bench_runner.py57
LOWtools/advisor/advisor/db_config_optimizer.py19
LOWtools/advisor/advisor/db_config_optimizer.py54
LOWtools/advisor/advisor/db_stats_fetcher.py65
LOWtools/advisor/advisor/db_stats_fetcher.py92
LOWtools/advisor/advisor/db_stats_fetcher.py282
LOWtools/advisor/advisor/db_options_parser.py83
LOWtools/advisor/advisor/db_options_parser.py144
LOWtools/advisor/advisor/db_options_parser.py197
LOWtools/advisor/advisor/db_options_parser.py228
LOWtools/advisor/advisor/db_options_parser.py266
LOWtools/advisor/advisor/db_options_parser.py284
LOWtools/advisor/advisor/rule_parser.py58
LOWtools/advisor/advisor/rule_parser.py120
LOWtools/advisor/advisor/rule_parser.py222
LOWtools/advisor/advisor/rule_parser.py361
LOWtools/advisor/advisor/rule_parser.py429
LOWtools/advisor/advisor/db_log_parser.py113
LOWtools/block_cache_analyzer/block_cache_pysim.py1537
LOWtools/block_cache_analyzer/block_cache_pysim.py1666
LOWtools/block_cache_analyzer/block_cache_pysim.py121
LOWtools/block_cache_analyzer/block_cache_pysim.py163
LOWtools/block_cache_analyzer/block_cache_pysim.py460
LOW…lock_cache_analyzer/block_cache_trace_analyzer_plot.py51
LOW…lock_cache_analyzer/block_cache_trace_analyzer_plot.py93
LOW…lock_cache_analyzer/block_cache_trace_analyzer_plot.py210
LOW…lock_cache_analyzer/block_cache_trace_analyzer_plot.py261
LOWbuckifier/buckify_rocksdb.py74
LOWbuckifier/buckify_rocksdb.py118
LOWbuild_tools/benchmark_log_tool.py117
LOWbuild_tools/amalgamate.py71
LOWbuild_tools/getdeps_fallback_mirror.py87
Self-Referential Comments9 hits · 32 pts
SeverityFileLineSnippet
MEDIUMtools/benchmark_ci.py94 # Create a symlink to the db_bench executable
MEDIUMtools/benchmark.sh784 # Define a set of benchmarks.
MEDIUMtools/advisor/advisor/rule_parser_example.py23 # Create the Log STATS object
MEDIUMtools/advisor/advisor/db_bench_runner.py212 # Create the Log STATS object
MEDIUMtools/advisor/advisor/db_bench_runner.py214 # Create the PerfContext STATS object
MEDIUMtools/advisor/advisor/db_bench_runner.py222 # Create the ODS STATS object
MEDIUMtools/advisor/advisor/db_config_optimizer.py70 # Create the updated configuration from the rule's suggestions
MEDIUMbuckifier/targets_cfg.py8# This file is a Meta-specific integration for buck builds, so can
MEDIUMbuckifier/rocks_test_runner.sh3# Create a tmp directory for the test to use
Excessive Try-Catch Wrapping13 hits · 16 pts
SeverityFileLineSnippet
LOWtools/ldb_test.py90 except Exception:
LOWtools/advisor/advisor/db_timeseries_parser.py184 except Exception as e:
LOWtools/advisor/advisor/db_timeseries_parser.py200 except Exception as e:
MEDIUMtools/advisor/advisor/db_bench_runner.py160 print("Error: rmdir " + e.filename + " " + e.strerror)
LOWtools/advisor/advisor/db_options_parser.py320 except Exception as e:
LOWtools/advisor/advisor/db_options_parser.py339 except Exception as e:
LOWbuckifier/buckify_rocksdb.py310 except Exception:
LOWbuild_tools/getdeps_fallback_mirror.py46 except Exception:
LOWbuild_tools/getdeps_fallback_mirror.py57 except Exception as ex:
LOWbuild_tools/getdeps_fallback_mirror.py72 except Exception:
LOWbuild_tools/getdeps_fallback_mirror.py165 except Exception as ex:
LOWbuild_tools/getdeps_fallback_mirror.py222 except Exception as ex:
MEDIUMbuild_tools/getdeps_fallback_mirror.py69def file_size(path):
Unused Imports13 hits · 13 pts
SeverityFileLineSnippet
LOWtools/ldb_test.py11
LOWtools/advisor/advisor/db_timeseries_parser.py9
LOWtools/advisor/advisor/db_stats_fetcher.py11
LOWtools/block_cache_analyzer/block_cache_pysim_test.py8
LOWtools/block_cache_analyzer/block_cache_pysim_test.py8
LOWtools/block_cache_analyzer/block_cache_pysim_test.py8
LOWtools/block_cache_analyzer/block_cache_pysim_test.py8
LOWbuckifier/util.py7
LOWbuckifier/util.py9
LOWbuckifier/targets_builder.py4
LOWbuckifier/targets_builder.py6
LOWbuckifier/buckify_rocksdb.py5
LOWbuckifier/buckify_rocksdb.py7
Redundant / Tautological Comments7 hits · 10 pts
SeverityFileLineSnippet
LOWtools/generate_random_db.sh32# Check if deleterange command is supported by grepping ldb --help
LOWtools/ldb_test.py855 # Check if null characters doesn't infer with output format.
LOWbuild_tools/format-diff.sh109# Check if this script has already been added to pre-commit hook.
LOWbuild_tools/format-diff.sh172 # Check if file is missing copyright
LOWbuild_tools/check_progress.sh67 # Check if failed (exitval != 0 or signal != 0)
LOWbuild_tools/check_progress.sh102# Check if tests are running (LOG file exists)
LOWbuild_tools/getdeps_fallback_mirror.py134 # Check if already valid.
Cross-Language Confusion2 hits · 8 pts
SeverityFileLineSnippet
HIGHtools/run_clang_tidy.py234 " mkdir build && cd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..\n"
HIGHbuckifier/util.py98 running `cmd1 && cmd2 && cmd3`
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippet
LOWtools/analyze_txn_stress_test.sh3# Usage:
LOWutil/defer.h17// Usage example:
LOWbuckifier/buckify_rocksdb.py21# Usage:
LOW.github/scripts/ccache-trim.sh4# Usage: