Skip to content

2.25.1.0-b141

@harshitha-yb harshitha-yb tagged this 07 Jan 14:41
Summary:
Adds YBA API to clone namespaces. We would like to support database cloning from the Platform and as part of it, we would like to leverage yb-client to perform the clone-related functionality. This PR intends to cover all aspects needed for the end-to-end management of clones.

The following changes have been made as part of this PR:

Support for clone management RPC calls through yb-client.
API support from the Platform to create database clones (API to list the clones is not a priority at the moment, will be taken up later if needed).
Task framework support for clone creation.

API path- POST /api/v1/customers/f33e3c9b-75ab-4c30-80ad-cba85646ea39/universes/a383fd86-e512-42d8-b399-a761cc339560/keyspaces/{YSQL|YCQL}/{cloneDbName}/clone

Request body-
{
    "targetKeyspaceName": "new_db_clone_final" // mandatory
    "cloneTimeInMillis":  "1735308035422" // optional, if not provided the DB is cloned from its current state
}

Response-
{
    "taskUUID": "76765f8a-afc8-4f76-b7df-4c1c4e6b7349"
}

Test Plan:
Tested manually via UI and verified that clones were made successfully.

- Create YSQL and YCQl databases and corresponding snapshot schedules for them. Create clones for those namespaces and verify that they are created successfully with all tables cloned.
-  Tested for negative cases against the pre validations done.

Reviewers: #yba-api-review, vkumar, vpatibandla, vkushwaha, sneelakantan

Reviewed By: #yba-api-review, vkumar, sneelakantan

Subscribers: svc_phabricator, yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D40767
Assets 2
Loading