executor,store/tikv: fix data race (#2833)

This commit is contained in:
tiancaiamao
2017-03-15 20:10:40 +08:00
committed by GitHub
parent 88d8a841e4
commit c93cfcb025
2 changed files with 0 additions and 7 deletions

View File

@ -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")

View File

@ -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 {