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

server, sessionctx: workaround var initialization #9383

Merged
merged 5 commits into from
Feb 21, 2019
Merged

server, sessionctx: workaround var initialization #9383

merged 5 commits into from
Feb 21, 2019

Conversation

morgo
Copy link
Contributor

@morgo morgo commented Feb 20, 2019

What problem does this PR solve?

This provides a workaround for #9382

I suggest a longer-term fix here: #9381

What is changed and how it works?

This makes various sysvars work:

  • port
  • datadir
  • socket

Port was previously added in #9365 , but it turns out this did not work correctly since it retrieved the 'default' port prior to parsing the config file. I have changed the value to be "4000" in variables so it becomes less confusing since this doesn't work.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

The test-suite contains the server variables from the default config only, and so it is difficult to assert for these changes.

Code changes

  • Has exported variable/fields change

Side effects

  • Increased code complexity (workaround)

Related changes

  • Need to update the documentation
  • Need to be included in the release note

Set variable values on server start
@morgo
Copy link
Contributor Author

morgo commented Feb 20, 2019

/run-all-tests

@codecov-io
Copy link

codecov-io commented Feb 20, 2019

Codecov Report

Merging #9383 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9383      +/-   ##
==========================================
+ Coverage   67.16%   67.17%   +0.01%     
==========================================
  Files         373      373              
  Lines       78269    78269              
==========================================
+ Hits        52567    52580      +13     
+ Misses      20995    20986       -9     
+ Partials     4707     4703       -4
Impacted Files Coverage Δ
sessionctx/variable/sysvar.go 100% <ø> (ø) ⬆️
store/tikv/gcworker/gc_worker.go 41.14% <0%> (-0.43%) ⬇️
executor/join.go 79.42% <0%> (+0.52%) ⬆️
util/filesort/filesort.go 76.48% <0%> (+1.25%) ⬆️
infoschema/infoschema.go 77.63% <0%> (+1.31%) ⬆️
ddl/delete_range.go 77.77% <0%> (+2.64%) ⬆️
util/systimemon/systime_mon.go 100% <0%> (+20%) ⬆️

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 042e410...0a00845. Read the comment docs.

@morgo morgo added the type/bugfix This PR fixes a bug. label Feb 20, 2019
@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 21, 2019
@morgo
Copy link
Contributor Author

morgo commented Feb 21, 2019

@jackysp thanks for the suggestion, I've moved it. PTAL again.

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

@jackysp
Copy link
Member

jackysp commented Feb 21, 2019

/run-all-tests

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 21, 2019
@jackysp jackysp merged commit e6f4f6c into pingcap:master Feb 21, 2019
@morgo morgo deleted the accurate-socket-datadir branch February 21, 2019 09:55
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants