-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add naive region failover test for metric table #4269
feat: add naive region failover test for metric table #4269
Conversation
Note Reviews pausedUse the following commands to manage reviews:
WalkthroughThis update introduces a new fuzz testing binary for assessing failover scenarios in a distributed system. The functionality includes operations like creating and querying tables, simulating failures, and maintaining data integrity. Additionally, improvements are made to log messages in an existing fuzz test. Changes
Sequence Diagram(s)sequenceDiagram
participant Tester
participant FuzzContext
participant PhysicalTable
participant LogicalTable
Tester->>FuzzContext: Create FuzzContext
FuzzContext->>PhysicalTable: create_physical_table()
PhysicalTable->>FuzzContext: return TableContextRef
FuzzContext->>LogicalTable: create_logical_table(TableContextRef)
LogicalTable->>FuzzContext: return LogicalTableContextRef
Tester->>FuzzContext: insert_values()
FuzzContext->>LogicalTable: Generate & Insert Data Rows
LogicalTable->>FuzzContext: return InsertResult
Tester->>FuzzContext: execute_failover()
FuzzContext->>Tester: Validate & return Result
Possibly related issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range and nitpick comments (1)
tests-fuzz/targets/failover/fuzz_failover_metric_regions.rs (1)
155-183
: Include a link to the relevant issue.The comment regarding unprepared queries should include a link to the relevant issue.
- // unprepared query, see <https://github.com/GreptimeTeam/greptimedb/issues/3500> + // unprepared query, see <https://github.com/GreptimeTeam/greptimedb/issues/3500> for more details.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- tests-fuzz/Cargo.toml (1 hunks)
- tests-fuzz/targets/failover/fuzz_failover_metric_regions.rs (1 hunks)
- tests-fuzz/targets/failover/fuzz_failover_mito_regions.rs (1 hunks)
Files skipped from review due to trivial changes (2)
- tests-fuzz/Cargo.toml
- tests-fuzz/targets/failover/fuzz_failover_mito_regions.rs
Additional comments not posted (6)
tests-fuzz/targets/failover/fuzz_failover_metric_regions.rs (6)
70-75
: LGTM!The
FuzzInput
struct is well-defined and encapsulates the input required for the fuzz test.
89-100
: LGTM!The
generate_create_physical_table_expr
function is well-defined and generates aCreateTableExpr
for a physical table.
102-117
: LGTM!The
create_physical_table
function is well-defined and translates theCreateTableExpr
into SQL.
119-137
: LGTM!The
generate_create_logical_table_expr
function is well-defined and generates aCreateTableExpr
for a logical table.
139-153
: LGTM!The
generate_insert_expr
function is well-defined and generates anInsertIntoExpr
for inserting values into a table.
287-303
: LGTM!The
fuzz_target
macro is well-defined and correctly sets up the fuzz target for the failover scenario.
@coderabbitai pause |
Actions performedReviews paused. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4269 +/- ##
==========================================
- Coverage 84.91% 84.69% -0.23%
==========================================
Files 1056 1061 +5
Lines 187319 188108 +789
==========================================
+ Hits 159071 159310 +239
- Misses 28248 28798 +550 |
f2b1a60
to
78bb8dc
Compare
78bb8dc
to
8a311ba
Compare
e60d03d
to
bdc2b3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
Add naive failover test for metric table
Checklist
Summary by CodeRabbit