Geo: Minor adjustments to verification logic
What does this MR do?
First commit: Perform Replicator#verify even if not "started"
This helped me during manual testing, and I think the logic is more expected this way.
-
Geo::VerificationWorker
is already deduplicated for identical args since it is markedidempotent!
- We actually only care about blocking
VerificationBatchWorker
from attempting to pick up records which are marked started. This already happens in the query which picks up pending/failed records and marks them started, atomically. SoVerificationBatchWorker
doesn't conflict with itself. But if a sysadmin wants to attempt a verification manually, or if an event triggersVerificationWorker
, it's ok if it runs. - When
verification_state
is notverification_started
, it is not necessary forVerificationWorker#perform
orReplicator#verify
to exit without doing work. Rather, it is unexpected.
Second commit: Allow transition to failed from any state
I ran into this as a one-off problem when testing with local test data which was already invalid. I think this change may avoid other unexpected edge cases.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry => behind feature flag
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Michael Kozono