Skip to content

Geo Primary Verification API: POST api/v4/admin/data_management/:model/checksum

Why are we doing this work

This work will be behind feature flag geo_primary_verification_view

We are building a view for customers to manage their instance's data and verify primary data integrity for Geo Improve primary verification experience (&16554)

important: This endpoint should be marked as experimental or beta until this work is complete to avoid issues with deprecations or removals as we explore what is needed.

note: The proposed endpoint may be changed based on decisions on the routing

What is needed in this change

This functionality will only be available if checksumming is enabled for the model.

This change is focused on creating the Checksum Bulk Action that will allow users to trigger a checksum event for an entire model table. This will function similar to the Bulk Actions available on the Secondary Replication Views.

We also will want to allow users to fire bulk actions against a query, and that will be added as part of Geo Primary Verification API: POST api/v4/admin... (#537711)

Relevant links

Implementation plan

This is an extension from #537707 (closed). A simple plan would be to:

  1. add a new endpoint under the :model_name route parameter;
  2. find the matching Replicator from the model;
  3. return an error if checksumming is not enabled for the model: using verification_enabled? on the matching Replicator should work;
  4. create a new method, which can take parameters and will apply .verify_async on all records matching the parameters;
  5. use this method in the endpoint created in point 1
Edited by 🤖 GitLab Bot 🤖