Separate knob buggification from general buggification#12932
Open
Adityakk9031 wants to merge 1 commit intoapple:mainfrom
Open
Separate knob buggification from general buggification#12932Adityakk9031 wants to merge 1 commit intoapple:mainfrom
Adityakk9031 wants to merge 1 commit intoapple:mainfrom
Conversation
Contributor
Author
|
@saintstack sir have a look please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Currently, enabling BUGGIFY in FoundationDB activates all randomized behaviors globally. In non-simulated clusters (e.g., real hardware or large-scale integrations), we often want to test with randomized knob values. However, most knobs must be uniform across all processes in the cluster. Activating global BUGGIFY triggers many other randomized failure behaviors that are not suitable for these environments.
Solution
This PR decouples knob-specific buggification from general system buggification.
Introduced a new Knobs category in BuggifyType.
Created a BUGGIFY_KNOB macro that specifically checks the Knobs buggify state.
Migrated all BUGGIFY calls within knob initialization (flow/Knobs.cpp, fdbclient/ClientKnobs.cpp) to BUGGIFY_KNOB.
Added a new command-line argument --buggify-knobs [on|off] to fdbserver to allow independent control.
Ensured that in simulation, knob buggification follows the standard buggify override for consistency.
Changes
flow/include/flow/Buggify.h: Added KNOBS category and BUGGIFY_KNOB/BUGGIFY_KNOB_WITH_PROB macros.
flow/Knobs.cpp: Replaced BUGGIFY with BUGGIFY_KNOB in global flow knob definitions.
fdbclient/ClientKnobs.cpp: Replaced BUGGIFY with BUGGIFY_KNOB in client knob definitions.
fdbserver/fdbserver.actor.cpp:
Added knobsBuggifyEnabled flag to CLIOptions.
Added --buggify-knobs CLI argument parsing.
Updated main() to toggle knob buggification independently.
Synchronized knobsBuggifyEnabled with buggifyOverride in simulation mode.