I hope we can change badger and unistore as an interface plugin. It means that only TiDB test will depend on badger and unistore. TiDB library and binary will not depend on them so that if there is any repo depend on TiDB, it would never be effected by unistore and badger.
… also dependency on badger pollute other dependencies and cause issues like
TiDB doesn’t depend on
unistore repo in the master branch, for the forked
pingcap/badger repo, it’s only used by tidb. We can modify it anyway we want.
backup feature in
badger is not needed, we can simply remove it.
It seems that if some repo depend on
tidb/br, it will compile the whole tidb repo…
Seems we need to clean the dependency of tidb/br
There are two ideas from my side,
pingcap/badgeras we don’t need it.
- Investigate go submodule to see whether we can improve modularity.
It looks like there are two problems here:
- a) projects that depend on tidb will also depend on br
- b) projects that depend on br will also depend on tidb
Creating a separate
go.mod for br will solve problem b, but only if the mutual dependencies between br and tidb are resolved first.
For problem a, the non-test version of tidb actually needs to use unistore as well (standalone mode without using tikv). We also need to disassemble the tidb mod further. This could be done by separating tidb as a library from the tidb-server as an app and making only the tidb-server import unistore.