Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: integrate plugin framework with TiDB #9006

Merged
merged 7 commits into from
Jan 14, 2019
Merged

*: integrate plugin framework with TiDB #9006

merged 7 commits into from
Jan 14, 2019

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Jan 10, 2019

What problem does this PR solve?

following up #8788, integration plugin framework into TiDB

What is changed and how it works?

  • add plugin_dir and plugin_load config
  • make loadCommonGlobalVarsSQL be tweakable before boostrap
  • load plugin before boostrap

Check List

Tests

  • manual test
1. checkout https://github.com/lysu/slow_log_table
2. pluginpkg slow_log_table
3. load with tidb
4. check slow log table exists

Code changes

  • change Impl

Side effects

  • N/A

Related changes

  • N/A

This change is Reviewable

@lysu lysu changed the title Plugin tidb integration *: integrate plugin framework with TiDB Jan 10, 2019
@codecov-io
Copy link

codecov-io commented Jan 10, 2019

Codecov Report

Merging #9006 into master will decrease coverage by 0.03%.
The diff coverage is 29.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9006      +/-   ##
==========================================
- Coverage   67.28%   67.25%   -0.04%     
==========================================
  Files         371      371              
  Lines       75930    75972      +42     
==========================================
+ Hits        51092    51094       +2     
- Misses      20332    20367      +35     
- Partials     4506     4511       +5
Impacted Files Coverage Δ
config/config.go 14.54% <ø> (ø) ⬆️
sessionctx/variable/sysvar.go 100% <ø> (ø) ⬆️
executor/show.go 41.21% <0%> (-0.26%) ⬇️
infoschema/perfschema/tables.go 60% <0%> (-18.95%) ⬇️
planner/core/planbuilder.go 50.12% <0%> (ø) ⬆️
sessionctx/variable/varsutil.go 25.46% <0%> (-0.33%) ⬇️
domain/topn_slow_query.go 95.69% <0%> (-2.11%) ⬇️
session/session.go 72.35% <38.88%> (-0.67%) ⬇️
domain/domain.go 35.7% <60%> (-0.02%) ⬇️
infoschema/infoschema.go 78.91% <66.66%> (-0.67%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f346a3...ddde149. Read the comment docs.

@lysu
Copy link
Contributor Author

lysu commented Jan 14, 2019

/run-all-tests

@lysu
Copy link
Contributor Author

lysu commented Jan 14, 2019

@tiancaiamao PTAL it also contain a part of #8981

@lysu
Copy link
Contributor Author

lysu commented Jan 14, 2019

/run-all-tests

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -12,7 +12,7 @@ path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH)))
export PATH := $(path_to_add):$(PATH)

GO := GO111MODULE=on go
GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
GOBUILD := CGO_ENABLED=1 $(GO) build $(BUILD_FLAG)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tennix PTAL if it will affect the docker image in k8s.

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 14, 2019
@jackysp jackysp merged commit 4b98ad6 into pingcap:master Jan 14, 2019
@lysu lysu deleted the plugin-tidb-integration branch March 25, 2019 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugin status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants