Skip to content

Commit bde0cfb

Browse files
-- do not merge to master -- skip cleanup on refresh for 1-1 restore
1 parent cac12ff commit bde0cfb

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

pkg/scyllaclient/client_scylla.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,13 +1141,25 @@ func (c *Client) AwaitLoadSSTables(ctx context.Context, host, keyspace, table st
11411141
// loadSSTables does not perform any special error, timeout or retry handling.
11421142
// See AwaitLoadSSTables for a wrapper with those features.
11431143
func (c *Client) loadSSTables(ctx context.Context, host, keyspace, table string, loadAndStream, primaryReplicaOnly, skipCleanup bool) error {
1144+
params := &operations.StorageServiceSstablesByKeyspacePostParams{
1145+
Context: forceHost(ctx, host),
1146+
Keyspace: keyspace,
1147+
Cf: table,
1148+
}
1149+
if loadAndStream {
1150+
params.LoadAndStream = &loadAndStream
1151+
}
1152+
if primaryReplicaOnly {
1153+
params.PrimaryReplicaOnly = &primaryReplicaOnly
1154+
}
1155+
if skipCleanup {
1156+
params.SkipCleanup = &skipCleanup
1157+
}
1158+
11441159
_, err := c.scyllaOps.StorageServiceSstablesByKeyspacePost(&operations.StorageServiceSstablesByKeyspacePostParams{
1145-
Context: forceHost(ctx, host),
1146-
Keyspace: keyspace,
1147-
Cf: table,
1148-
LoadAndStream: &loadAndStream,
1149-
PrimaryReplicaOnly: &primaryReplicaOnly,
1150-
SkipCleanup: &skipCleanup,
1160+
Context: forceHost(ctx, host),
1161+
Keyspace: keyspace,
1162+
Cf: table,
11511163
})
11521164
return err
11531165
}

0 commit comments

Comments
 (0)