Skip to content

Commit

Permalink
Merge pull request #19208 from a6802739/TestSystemZoneConfigs
Browse files Browse the repository at this point in the history
storage: fix bug for the testrace of TestSystemZoneConfigs
  • Loading branch information
a6802739 authored Oct 12, 2017
2 parents e43f68f + 7fbd36c commit f0a3407
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/storage/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,11 @@ func (a Allocator) RebalanceTarget(
StoreID: target.store.StoreID,
ReplicaID: rangeInfo.Desc.NextReplicaID,
}

// Deep-copy the Replicas slice since we'll mutate it.
desc := *rangeInfo.Desc
desc.Replicas = append([]roachpb.ReplicaDescriptor(nil), desc.Replicas...)

desc.Replicas = append(desc.Replicas, newReplica)
rangeInfo.Desc = &desc

Expand Down

0 comments on commit f0a3407

Please sign in to comment.