Skip to content

Commit fca8d54

Browse files
karol-kokoszkaVAveryanov8
authored andcommitted
-- do not merge to master -- skip cleanup on refresh for 1-1 restore
1 parent 84042db commit fca8d54

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
@@ -1154,13 +1154,25 @@ func (c *Client) AwaitLoadSSTables(ctx context.Context, host, keyspace, table st
11541154
// loadSSTables does not perform any special error, timeout or retry handling.
11551155
// See AwaitLoadSSTables for a wrapper with those features.
11561156
func (c *Client) loadSSTables(ctx context.Context, host, keyspace, table string, loadAndStream, primaryReplicaOnly, skipCleanup bool) error {
1157+
params := &operations.StorageServiceSstablesByKeyspacePostParams{
1158+
Context: forceHost(ctx, host),
1159+
Keyspace: keyspace,
1160+
Cf: table,
1161+
}
1162+
if loadAndStream {
1163+
params.LoadAndStream = &loadAndStream
1164+
}
1165+
if primaryReplicaOnly {
1166+
params.PrimaryReplicaOnly = &primaryReplicaOnly
1167+
}
1168+
if skipCleanup {
1169+
params.SkipCleanup = &skipCleanup
1170+
}
1171+
11571172
_, err := c.scyllaOps.StorageServiceSstablesByKeyspacePost(&operations.StorageServiceSstablesByKeyspacePostParams{
1158-
Context: forceHost(ctx, host),
1159-
Keyspace: keyspace,
1160-
Cf: table,
1161-
LoadAndStream: &loadAndStream,
1162-
PrimaryReplicaOnly: &primaryReplicaOnly,
1163-
SkipCleanup: &skipCleanup,
1173+
Context: forceHost(ctx, host),
1174+
Keyspace: keyspace,
1175+
Cf: table,
11641176
})
11651177
return err
11661178
}

0 commit comments

Comments
 (0)