pingcap/tidb

executor.Next() should not call chid.Open() or child.Close()

Open

#4,983 opened on 2017年11月2日

GitHub で見る
 (1 comment) (0 reactions) (1 assignee)Go (40,090 stars) (6,186 forks)batch import
help wanted

説明

calling Open() or Close() during Next() makes our executors un-maintainable, for example, if we comment out the following lines then make test, our ut failes ... https://github.com/pingcap/tidb/blob/0616a2fd1511e2206086c212261d93b1106605c7/executor/executor.go#L345

or https://github.com/pingcap/tidb/blob/0616a2fd1511e2206086c212261d93b1106605c7/executor/join.go#L88

Open is used to initialize executors and allocate resources for every executor Close is used to deallocate the resource adopted by every executor, avoid memory leak

コントリビューターガイド

executor.Next() should not call chid.Open() or child.Close() · pingcap/tidb#4983 | Good First Issue