CASSSIDECAR-226 Adding endpoint for verifying files post data copy during live migration #309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CASSSIDECAR-226 Adding an endpoint for verifying files between source and destination post data copy.
This implementation uses a two-task approach (data copy + file verification) rather than inline digest verification during data copy (as originally proposed in CEP-40). This design choice is motivated by:
Here are the endpoint details:
Sample files verification task submission request:
It supports XXHash32 algorithm too and
seedas additional input in the payload.Sample response:
{ "taskId": "b8e4f3d2-5c6b-5d9e-0f2g-3b4c5d6e7f8g", "statusUrl": "/api/v1/live-migration/files-verification-tasks/b8e4f3d2-5c6b-5d9e-0f2g-3b4c5d6e7f8g" }Fetching files verification task status
Sample response:
{ "id": "b8e4f3d2-5c6b-5d9e-0f2g-3b4c5d6e7f8g ", "digestAlgorithm": "md5", "seed": null, "state": "COMPLETED", "source": "localhost1", "port": 9043, "filesNotFoundAtSource": 0, "filesNotFoundAtDestination": 0, "metadataMatched": 379, "metadataMismatches": 0, "digestMismatches": 0, "digestVerificationFailures": 0, "filesMatched": 323 }Also made additional changes to ensure that either data copy task or file verification task can be executed at any point of time.