-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add sanity check to InlineVerifier and TargetVerifier #261
base: main
Are you sure you want to change the base?
Conversation
3750b1c
to
d131335
Compare
d131335
to
34bc990
Compare
34bc990
to
5d96861
Compare
@@ -68,7 +68,7 @@ def test_different_compressed_data_is_detected_inline_with_batch_writer | |||
|
|||
assert verification_ran | |||
assert_equal ["#{DEFAULT_DB}.#{DEFAULT_TABLE}"], incorrect_tables | |||
assert_equal "cutover verification failed for: gftest.test_table_1 [paginationKeys: 1 ] ", ghostferry.error_lines.last["msg"] | |||
assert_equal "cutover verification failed for: gftest.test_table_1 [paginationKeys: 1 ] ", ghostferry.error_lines.first["msg"] |
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.
These tests will log target verifier did not check any events
since there are no events on the target. I added a separate test to check target verifier events below so I will ignore that error here
Same changes for tests below
if v.rowsChecked == 0 { | ||
return VerificationResult{ | ||
DataCorrect: false, | ||
Message: "cutover verification failed, no rows were compared", | ||
}, nil | ||
} |
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.
I wasn't sure how to test this in the ruby integration tests since in integrationferry here we only pass the incorrect tables. perhaps we pass the message as well?
#263
For InlineVerifier:
check if
rowsChecked > 0
when we runVerifyDuringCutover
.if no rows were checked, return
VerificationResult.DataCorrect = False
For TargetVerifier:
check after we run
StopTargetVerifier
to see if we verified any eventsif no events were checked, we log and return an error, copydb and sharding will then panic