executor,store/tikv: fix data race (#2833)
This commit is contained in:
@ -95,7 +95,6 @@ func (s *testSuite) TestCopClientSend(c *C) {
|
||||
// Split the table.
|
||||
cli := tikv.GetMockTiKVClient(s.store)
|
||||
cli.Cluster.SplitTable(cli.MvccStore, tblID, 100)
|
||||
tikv.ClearRegionCache(s.store)
|
||||
|
||||
// Send coprocessor request when the table split.
|
||||
rss, err := tk.Se.Execute("select sum(id) from copclient")
|
||||
|
||||
@ -130,12 +130,6 @@ func GetMockTiKVClient(store kv.Storage) *mocktikv.RPCClient {
|
||||
return s.client.(*mocktikv.RPCClient)
|
||||
}
|
||||
|
||||
// ClearRegionCache clears the region cache in the store.
|
||||
func ClearRegionCache(store kv.Storage) {
|
||||
s := store.(*tikvStore)
|
||||
s.regionCache = NewRegionCache(s.regionCache.pdClient)
|
||||
}
|
||||
|
||||
func (s *tikvStore) Begin() (kv.Transaction, error) {
|
||||
txn, err := newTiKVTxn(s)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user