From 44f9cdb39d6eb52470af646862a721ecf9cbc039 Mon Sep 17 00:00:00 2001 From: cuiqiu Date: Tue, 3 May 2016 16:01:03 +0800 Subject: [PATCH] store/tikv: unify to use close function when get data with error. (#1186) --- store/tikv/scan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/tikv/scan.go b/store/tikv/scan.go index 7bb1c8b17ba10..d35c9b5e0aec4 100644 --- a/store/tikv/scan.go +++ b/store/tikv/scan.go @@ -87,7 +87,7 @@ func (s *Scanner) Next() error { ret, err := s.getData() if err != nil { log.Errorf("getData failed: %s", err) - s.valid = false + s.Close() return errors.Trace(err) } s.cache = ret