Code Ownership

Ownership is measured by how many commits each author made to each file in the current tree. It highlights bus-factor risk (files only one person has ever touched) and where knowledge is concentrated. The bus factor is the smallest number of people who are, between them, primary owner of more than half of the files.

Files Tracked
7,838
in the current tree
Bus Factor
5
5 authors are primary owner of 4,043 of 7,838 files
Single-Owner Files
3,225
41.1% of tracked files
Contributors
484
authors who changed files

Bus factor risk — single-owner files

Files only one author has ever changed. The more a file has changed, the more knowledge is at risk if that person leaves.

FileSole ownerCommits
pkg/planner/core/logical_initialize.goArenatlx26
pkg/domain/crossks/cross_ks.goD3Hunter13
pkg/planner/core/casetest/tpch/BUILD.bazelWeizhen Wang13
pkg/planner/cascades/memo/memo.goArenatlx12
tests/realtikvtest/importintotest4/conflict_resolution_test.goD3Hunter11
pkg/dxf/framework/scheduler/scheduler_manager.goD3Hunter11
pkg/dxf/importinto/collect_conflicts.goD3Hunter11
pkg/server/handler/tikvhandler/dxf.goD3Hunter11
pkg/dxf/importinto/conflictedkv/BUILD.bazelD3Hunter11
pkg/dxf/framework/scheduler/scheduler_manager_nokit_test.goD3Hunter10
Table: the 100 most-changed of 3,225 single-owner files
FileSole ownerCommits
pkg/planner/core/logical_initialize.goArenatlx26
pkg/domain/crossks/cross_ks.goD3Hunter13
pkg/planner/core/casetest/tpch/BUILD.bazelWeizhen Wang13
pkg/planner/cascades/memo/memo.goArenatlx12
tests/realtikvtest/importintotest4/conflict_resolution_test.goD3Hunter11
pkg/dxf/framework/scheduler/scheduler_manager.goD3Hunter11
pkg/dxf/importinto/collect_conflicts.goD3Hunter11
pkg/server/handler/tikvhandler/dxf.goD3Hunter11
pkg/dxf/importinto/conflictedkv/BUILD.bazelD3Hunter11
pkg/dxf/framework/scheduler/scheduler_manager_nokit_test.goD3Hunter10
pkg/dxf/importinto/conflictedkv/collector.goD3Hunter10
pkg/planner/core/casetest/tpch/testdata/tpch_suite_in.jsonWeizhen Wang10
pkg/lightning/common/retry_test.goD3Hunter9
pkg/dxf/importinto/conflictedkv/handler_test.goD3Hunter9
pkg/dxf/framework/storage/history.goD3Hunter8
pkg/dxf/importinto/job.goD3Hunter8
pkg/dxf/framework/taskexecutor/manager.goD3Hunter8
pkg/ddl/schemaver/BUILD.bazelD3Hunter8
pkg/ddl/systable/manager.goD3Hunter8
pkg/util/memory/arbitrator.goZhigao TONG8
pkg/planner/core/casetest/rule/rule_predicate_simplification_test.goWeizhen Wang8
pkg/dxf/framework/scheduler/scheduler_test.goD3Hunter7
pkg/dxf/framework/taskexecutor/BUILD.bazelD3Hunter7
pkg/dxf/importinto/conflict_resolution.goD3Hunter7
pkg/dxf/importinto/conflictedkv/deleter.goD3Hunter7
pkg/dxf/importinto/proto.goD3Hunter7
pkg/ddl/schemaver/mem_syncer.goD3Hunter7
pkg/executor/distribute.gotongjian7
pkg/util/memory/arbitrator_test.goZhigao TONG7
pkg/util/memory/global_arbitrator.goZhigao TONG7
pkg/util/memory/utils.goZhigao TONG7
pkg/planner/core/casetest/rule/testdata/predicate_simplification_in.jsonWeizhen Wang7
tests/realtikvtest/pushdowntest/index_lookup_pushdown_test.goChao Wang6
pkg/dxf/importinto/clean_up.goD3Hunter6
pkg/dxf/framework/handle/status.goD3Hunter6
pkg/dxf/importinto/task_executor_test.goD3Hunter6
pkg/ddl/mock/BUILD.bazelD3Hunter6
pkg/lightning/common/common_test.goD3Hunter6
pkg/ddl/systable/manager_test.goD3Hunter6
pkg/ddl/mview_worker.goxufei6
pkg/parser/ast/stats_test.goDongpo Liu6
pkg/planner/core/casetest/tpch/main_test.goWeizhen Wang6
tests/integrationtest/t/executor/index_lookup_pushdown_partition.testChao Wang5
pkg/session/contextimpl.goChao Wang5
pkg/dxf/framework/scheduler/scheduler_manager_test.goD3Hunter5
pkg/ingestor/globalsort/util.goD3Hunter5
pkg/ingestor/globalsort/util_test.goD3Hunter5
pkg/dxf/framework/proto/task_test.goD3Hunter5
pkg/objstore/storage.goD3Hunter5
pkg/infoschema/isvalidator/validator.goD3Hunter5
pkg/ddl/mock/systable_manager_mock.goD3Hunter5
pkg/statistics/handle/autoanalyze/priorityqueue/interval.goDongpo Liu5
pkg/statistics/handle/autoanalyze/priorityqueue/calculatoranalysis/calculator_analysis_test.goDongpo Liu5
pkg/statistics/handle/autoanalyze/refresher/worker_test.goDongpo Liu5
br/pkg/restore/internal/import_client/import_client.goJianjun Liao5
br/pkg/streamhelper/export_test.goJianjun Liao5
pkg/executor/sortexec/parallel_sort_worker.goxzhangxian10085
pkg/executor/sortexec/sort_spill.goxzhangxian10085
pkg/planner/cascades/old/BUILD.bazelArenatlx5
pkg/planner/cascades/rule/rule.goArenatlx5
lightning/pkg/importinto/importer.goGMHDBJD5
br/pkg/errors/BUILD.bazelWeizhen Wang5
.github/dependabot.ymlWeizhen Wang5
br/tests/br_parallel_restore/run.shWenqi Mou5
br/pkg/restore/log_client/batch_meta_processor.goWenqi Mou5
docs/design/2021-03-09-dynamic-privileges.mdMorgan Tocker5
pkg/session/syssession/session.goChao Wang4
pkg/lightning/mydump/parser_test.goD3Hunter4
pkg/ingestor/globalsort/engine_test.goD3Hunter4
pkg/dxf/importinto/clean_up_test.goD3Hunter4
pkg/server/handler/tikvhandler/dxf_test.goD3Hunter4
pkg/dxf/framework/integrationtests/framework_test.goD3Hunter4
pkg/dxf/framework/taskexecutor/task_executor_test.goD3Hunter4
tests/realtikvtest/importintotest3/extra_param_test.goD3Hunter4
lightning/pkg/importer/tidb_test.goD3Hunter4
pkg/meta/metadef/BUILD.bazelD3Hunter4
pkg/ddl/serverstate/syncer_test.goD3Hunter4
lightning/tests/lightning_csv/run.shD3Hunter4
pkg/executor/mlog_purge.goxufei4
pkg/ddl/mview_worker_test.goxufei4
pkg/statistics/handle/autoanalyze/priorityqueue/calculator_test.goDongpo Liu4
pkg/statistics/handle/autoanalyze/priorityqueue/calculator.goDongpo Liu4
pkg/planner/extstore/extstore.gozeminzhou4
pkg/planner/extstore/extstore_test.gozeminzhou4
pkg/planner/cascades/rule/join/join_to_apply.goArenatlx4
pkg/planner/cascades/task/task_apply_rule.goArenatlx4
pkg/planner/cascades/task/task_opt_group_expression.goArenatlx4
pkg/ddl/engine_attribute.goConnor4
pkg/ddl/storage_class_test.goConnor4
pkg/util/memory/pool.goZhigao TONG4
pkg/metrics/memory.goZhigao TONG4
pkg/importsdk/config.goGMHDBJD4
lightning/pkg/importinto/job_submitter.goGMHDBJD4
lightning/pkg/importinto/job_submitter_test.goGMHDBJD4
pkg/util/traceevent/flightrecorder_test.gotiancaiamao4
tests/integrationtest/r/infoschema/v2.resulttiancaiamao4
tests/integrationtest/t/infoschema/v2.testtiancaiamao4
.github/actions/tidb_build/action.ymlWeizhen Wang4
pkg/planner/core/casetest/schema/testdata/cannot_find_column_suite_out.jsonWeizhen Wang4
pkg/planner/core/casetest/schema/testdata/cannot_find_column_suite_xut.jsonWeizhen Wang4

Ownership by author

Primary owner = the author with the most commits to a file. Solely owned = files only that author has touched.

AuthorFiles ownedSolely ownedFiles touched
D3Hunter1,9431,3083,331
bb71331,0374192,791
Weizhen Wang5631422,174
Arenatlx25187770
Chao Wang24927946
Hangjie Mo24372821
YangKeao22055948
Yuanjia Zhang17513839
Jianjun Liao16142372
Dongpo Liu15844538
xufei15783476
tiancaiamao13426563
xzhangxian10081268270
tpp11921386
Yiding Cui10630608
山岚10524228
tangenta1018520
lance67169118495
3pointer8250294
okJiang8037229
Mattias Jonsson74151,001
Ruihao Chen6931506
ChangRui-Ryan6763228
Wenqi Mou6439267
yibin618266

Showing top 25 of 484 contributors.

Most shared files

Files touched by the most people — shared code where changes are most likely to need coordination.

FileContributorsPrimary ownerOwner share
go.sum189Weizhen Wang10.0%
go.mod185Weizhen Wang11.6%
Makefile103Weizhen Wang17.0%
DEPS.bzl88Weizhen Wang20.1%
errors.toml88D3Hunter8.2%
pkg/sessionctx/variable/sysvar.go62Weizhen Wang9.6%
pkg/session/session.go59D3Hunter13.3%
README.md54Shen Li6.8%
pkg/sessionctx/variable/session.go53Yuanjia Zhang8.4%
pkg/planner/core/planbuilder.go52Yuanjia Zhang13.7%
pkg/executor/BUILD.bazel52D3Hunter14.5%
pkg/parser/parser.y50Yuanjia Zhang13.2%
pkg/parser/parser.go50Yuanjia Zhang13.3%
pkg/executor/builder.go49Arenatlx14.0%
pkg/domain/domain.go48D3Hunter19.0%
pkg/parser/parser_test.go44Yuanjia Zhang13.5%
pkg/infoschema/tables.go43Daniël van Eeden9.0%
pkg/executor/adapter.go42Yuanjia Zhang15.8%
pkg/executor/infoschema_reader.go42tangenta11.3%
pkg/sessionctx/variable/tidb_vars.go40Weizhen Wang13.2%