Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Enforce HARDLINKS restore strategy as it is faster #290

Merged
merged 3 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions deploy/crds/db.orange.com_cassandrarestores_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ spec:
description: When set do not delete truncated SSTables after they've
been restored during CLEANUP phase. Defaults to false
type: boolean
restorationStrategyType:
description: Strategy telling how we should go about restoration,
please refer to details in backup and sidecar documentation
enum:
- HARDLINKS
- IMPORT
type: string
schemaVersion:
description: Version of the schema to restore from. Upon backup, a
schema version is automatically appended to a snapshot name and
Expand Down
3 changes: 0 additions & 3 deletions pkg/apis/db/v1alpha1/cassandrarestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ type CassandraRestoreSpec struct {
// want to restore a table for which its CQL schema has not changed but it has changed for other table / keyspace
// but a schema for that node has changed by doing that. Defaults to False
ExactSchemaVersion bool `json:"exactSchemaVersion,omitempty""`
// Strategy telling how we should go about restoration, please refer to details in backup and sidecar documentation
// +kubebuilder:validation:Enum={"HARDLINKS","IMPORT"}
RestorationStrategyType string `json:"restorationStrategyType,omitempty"`
// Database entities to restore, it might be either only keyspaces or only tables prefixed by their respective
// keyspace, e.g. 'k1,k2' if one wants to backup whole keyspaces or 'ks1.t1,ks2.t2' if one wants to restore specific
// tables. These formats are mutually exclusive so 'k1,k2.t2' is invalid. An empty field will restore all keyspaces
Expand Down
2 changes: 1 addition & 1 deletion pkg/backrest/backrest.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *Client) PerformRestore(restore *api.CassandraRestore,
K8sSecretName: restore.Spec.Secret,
CassandraDirectory: restore.Spec.CassandraDirectory,
SchemaVersion: restore.Spec.SchemaVersion,
RestorationStrategyType: restore.Spec.RestorationStrategyType,
RestorationStrategyType: "HARDLINKS",
ResolveHostIdFromTopology: true,
}

Expand Down
1 change: 0 additions & 1 deletion pkg/backrest/backrest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func TestPerformRestore(t *testing.T) {
Spec: v1alpha1.CassandraRestoreSpec{
ConcurrentConnection: &concurrentConnection,
NoDeleteTruncates: true,
RestorationStrategyType: "HARDLINKS",
CassandraCluster: "cassandra-bgl",
CassandraBackup: "gcp_backup",
},
Expand Down