Hi here!
I am trying to get involved with the big effort Provide standalone Go client based on the one embedded as store/tikv
inside pingcap/tidb repo.
Running the attached command gives remaining dependencies from store/tikv
to tidb.
$ grep -r "github.com/pingcap/tidb" store/tikv | grep -v "github.com/pingcap/tidb/store/tikv" | grep -v "failpoint" | awk '{if(NF==3){print $3,$1}else{print $2,$1}}' | grep -v "store/tikv/tests" | sort -u
"github.com/pingcap/tidb/kv" store/tikv/extract_start_ts_test.go:
"github.com/pingcap/tidb/kv" store/tikv/kv.go:
"github.com/pingcap/tidb/kv" store/tikv/txn.go:
"github.com/pingcap/tidb/store/mockstore/unistore" store/tikv/extract_start_ts_test.go:
// store/tikv/region_request.go:
It store/tikv/util/testleak/check-leaktest.sh:#
while which is reported in store/tikv/kv.go
and store/tikv/txn.go
is tidb/kv.TransactionOption
. I have no idea how to break the dependency to it.
I post the question here instead of the issue because the problem is not how to break a code dependency but how TiDB uses TransactionOption
to interact with tikv (client) for implementing transaction.
With the answer of this question it should be clear what to do to the codebase, as well as the answer should be useful for those who are interested with this part beyond a code refactor only.