@@ -63,6 +63,7 @@ type StoreInfo struct {
6363 pauseLeaderTransferOut atomic.Int64 // not allow to be used as source of transfer leader
6464 slowStoreEvicted atomic.Int64 // this store has been evicted as a slow store, should not transfer leader to it
6565 slowTrendEvicted atomic.Int64 // this store has been evicted as a slow store by trend, should not transfer leader to it
66+ stoppingStoreEvicted atomic.Int64 // this store has been evicted as a stopping store, should not transfer leader to it
6667 leaderCount int
6768 regionCount int
6869 learnerCount int
@@ -137,6 +138,7 @@ func (s *StoreInfo) Clone(opts ...StoreCreateOption) *StoreInfo {
137138 store .pauseLeaderTransferOut .Store (s .pauseLeaderTransferOut .Load ())
138139 store .slowStoreEvicted .Store (s .slowStoreEvicted .Load ())
139140 store .slowTrendEvicted .Store (s .slowTrendEvicted .Load ())
141+ store .stoppingStoreEvicted .Store (s .stoppingStoreEvicted .Load ())
140142 for _ , opt := range opts {
141143 if opt != nil {
142144 opt (store )
@@ -183,6 +185,7 @@ func (s *StoreInfo) ShallowClone(opts ...StoreCreateOption) *StoreInfo {
183185 store .pauseLeaderTransferOut .Store (s .pauseLeaderTransferOut .Load ())
184186 store .slowStoreEvicted .Store (s .slowStoreEvicted .Load ())
185187 store .slowTrendEvicted .Store (s .slowTrendEvicted .Load ())
188+ store .stoppingStoreEvicted .Store (s .stoppingStoreEvicted .Load ())
186189 for _ , opt := range opts {
187190 opt (store )
188191 }
@@ -208,7 +211,7 @@ func (s *StoreInfo) EvictedAsSlowStore() bool {
208211
209212// EvictedAsStoppingStore returns if the store should be evicted as a stopping store.
210213func (s * StoreInfo ) EvictedAsStoppingStore () bool {
211- return s .rawStats . IsStopping
214+ return s .stoppingStoreEvicted . Load () > 0
212215}
213216
214217// IsEvictedAsSlowTrend returns if the store should be evicted as a slow store by trend.
0 commit comments