-
Notifications
You must be signed in to change notification settings - Fork 75
Add sanity check to InlineVerifier and TargetVerifier #261
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
base: main
Are you sure you want to change the base?
Conversation
3750b1c to
d131335
Compare
d131335 to
34bc990
Compare
34bc990 to
5d96861
Compare
| 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 > 0when we runVerifyDuringCutover.if no rows were checked, return
VerificationResult.DataCorrect = FalseFor TargetVerifier:
check after we run
StopTargetVerifierto see if we verified any eventsif no events were checked, we log and return an error, copydb and sharding will then panic