Skip to content

Encapsulate path access in StressTest via accessors#14748

Closed
hx235 wants to merge 1 commit into
facebook:mainfrom
hx235:export-D104959943
Closed

Encapsulate path access in StressTest via accessors#14748
hx235 wants to merge 1 commit into
facebook:mainfrom
hx235:export-D104959943

Conversation

@hx235

@hx235 hx235 commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary:
Pure mechanical refactor: replace all direct FLAGS_db / FLAGS_expected_values_dir / FLAGS_secondaries_base reads with accessor methods on StressTest. No new flags, no parameters, no behavior change. Prepares for multi-DB stress test where each StressTest instance has its own DB.

Changes:

  • GetDbPath(), GetExpectedValuesDir(), GetSecondariesBase() accessors return the corresponding FLAGS values directly
  • Replace ~15 FLAGS_db references with GetDbPath() in db_stress_test_base.cc
  • Move SharedState constructor from .h to .cc (needs full StressTest type for GetExpectedValuesDir())
  • Move DbStressListener constructor from .h to .cc (same reason)
  • Replace FLAGS_db / FLAGS_expected_values_dir in db_stress_driver.cc with accessor calls
  • NO changes to db_crashtest.py or db_stress_gflags.cc

Differential Revision: D104959943

Summary:
Pure mechanical refactor: replace all direct FLAGS_db / FLAGS_expected_values_dir / FLAGS_secondaries_base reads with accessor methods on StressTest. No new flags, no parameters, no behavior change. Prepares for multi-DB stress test where each StressTest instance has its own DB.

Changes:
- GetDbPath(), GetExpectedValuesDir(), GetSecondariesBase() accessors return the corresponding FLAGS values directly
- Replace ~15 FLAGS_db references with GetDbPath() in db_stress_test_base.cc
- Move SharedState constructor from .h to .cc (needs full StressTest type for GetExpectedValuesDir())
- Move DbStressListener constructor from .h to .cc (same reason)
- Replace FLAGS_db / FLAGS_expected_values_dir in db_stress_driver.cc with accessor calls
- NO changes to db_crashtest.py or db_stress_gflags.cc

Differential Revision: D104959943
@meta-codesync

meta-codesync Bot commented May 16, 2026

Copy link
Copy Markdown

@hx235 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104959943.

@github-actions

Copy link
Copy Markdown

✅ clang-tidy: No findings on changed lines

Completed in 85.1s.

@hx235 hx235 closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment