Skip to content

Commit

Permalink
fix(restore): restore-schema, don't hide issues with raft schema
Browse files Browse the repository at this point in the history
Removing filtering was done so that our tests can pass with Scylla 5.4 and raft enabled, but it didn't improve the real life situations where agents don't have cross region remote location access.
  • Loading branch information
Michal-Leszczynski committed Jan 11, 2024
1 parent cba3937 commit ac4644b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkg/service/restore/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,11 @@ func (w *worker) initTarget(ctx context.Context, properties json.RawMessage) err
remotePath = l.RemotePath("")
locationStatus = status
)
// In order to improve restore schema stability, we ignore location's dc assignment
if t.RestoreTables {
if l.DC == "" {
w.logger.Info(ctx, "No datacenter specified for location - using all nodes for this location", "location", l)
} else {
locationStatus = status.Datacenter([]string{l.DC})
}

if l.DC == "" {
w.logger.Info(ctx, "No datacenter specified for location - using all nodes for this location", "location", l)
} else {
locationStatus = status.Datacenter([]string{l.DC})
}

nodes, err := w.client.GetNodesWithLocationAccess(ctx, locationStatus, remotePath)
Expand Down

0 comments on commit ac4644b

Please sign in to comment.