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: remove etcd #140

Merged
merged 4 commits into from
Dec 2, 2022
Merged

server: remove etcd #140

merged 4 commits into from
Dec 2, 2022

Conversation

xhebox
Copy link
Collaborator

@xhebox xhebox commented Dec 1, 2022

Signed-off-by: xhe xw897002528@gmail.com

What problem does this PR solve?

Issue Number: ref #136

Problem Summary: Removed etcd. ETCD's HTTP api may conflict with naming of serverless tier

But etcd flags and /api prefix are left. /api prefix will be removed in the next PR for new Handler api.

What is changed and how it works:

  1. a btree is used to replace etcd for persistence(in memory only)
  2. a refactor on code of config manager to reduce the complexity

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    I hooked a line in LoggerManager.watchCfg
[xhe@PC server]$ echo '{"level":"info","log-file":{"max-size":300,"max-days":1,"max-backups":1}}' | ../../bin/tiproxyctl config log set
2022/11/29 19:13:20.145 +08:00  INFO    main.lgmgr      logger/manager.go:68    updated cfg     {"cfg": {"level":"info","log-file":{"max-size":300,"max-days":1,"max-backups":1}}}
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change (Don't forget to add the declarative for API)
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox xhebox requested a review from djshow832 December 1, 2022 08:50
@xhebox xhebox mentioned this pull request Dec 1, 2022
13 tasks
@djshow832
Copy link
Collaborator

Please fix CI.

Copy link
Collaborator

@djshow832 djshow832 left a comment

Choose a reason for hiding this comment

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

Rest LGTM

pkg/manager/config/config.go Show resolved Hide resolved
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
@djshow832 djshow832 merged commit ed9650d into pingcap:main Dec 2, 2022
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 7, 2023
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants