Skip to content

Commit b275e7b

Browse files
committed
asim: remove setting from store
This commit removes the setting field from store struct as it is not used anywhere. Epic: none Release note: none
1 parent c97b2e3 commit b275e7b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pkg/kv/kvserver/asim/state/impl.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"github.com/cockroachdb/cockroach/pkg/raft/raftpb"
3333
"github.com/cockroachdb/cockroach/pkg/raft/tracker"
3434
"github.com/cockroachdb/cockroach/pkg/roachpb"
35-
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
3635
"github.com/cockroachdb/cockroach/pkg/spanconfig"
3736
"github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigreporter"
3837
"github.com/cockroachdb/cockroach/pkg/util/hlc"
@@ -576,7 +575,6 @@ func (s *state) AddStore(nodeID NodeID) (Store, bool) {
576575
storeID: storeID,
577576
nodeID: nodeID,
578577
desc: roachpb.StoreDescriptor{StoreID: roachpb.StoreID(storeID), Node: node.Descriptor()},
579-
settings: s.settings.ST,
580578
allocator: allocator,
581579
replicas: make(map[RangeID]ReplicaID),
582580
}
@@ -1129,8 +1127,8 @@ func (s *state) Clock() timeutil.TimeSource {
11291127
return s.clock
11301128
}
11311129

1132-
// UpdateStorePool modifies the state of the StorePool for the Store with
1133-
// ID StoreID.
1130+
// UpdateStorePool modifies the state of the StorePool for the Node with
1131+
// ID NodeID.
11341132
func (s *state) UpdateStorePool(
11351133
nodeID NodeID, storeDescriptors map[roachpb.StoreID]*storepool.StoreDetailMu,
11361134
) {
@@ -1457,7 +1455,6 @@ type store struct {
14571455
nodeID NodeID
14581456
desc roachpb.StoreDescriptor
14591457

1460-
settings *cluster.Settings
14611458
replicas map[RangeID]ReplicaID
14621459
// Old allocator is still used for queues.
14631460
allocator allocatorimpl.Allocator
@@ -1552,7 +1549,7 @@ func (r *rng) String() string {
15521549

15531550
for i, storeID := range storeIDs {
15541551
replica := r.replicas[storeID]
1555-
builder.WriteString(fmt.Sprintf("s%d:r%d", storeID, replica.replicaID))
1552+
builder.WriteString(fmt.Sprintf("s%d:r%d(%s)", storeID, replica.replicaID, replica.desc.Type))
15561553
if r.leaseholder == replica.replicaID {
15571554
builder.WriteString("*")
15581555
}

0 commit comments

Comments
 (0)