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

Implement Proxy's own status_server #141

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion components/proxy_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ backup-stream-debug = ["backup-stream/backup-stream-debug"]

[dependencies]
api_version = { path = "../api_version" }
async-stream = "0.2"
backup = { path = "../backup", default-features = false }
backup-stream = { path = "../backup-stream", default-features = false }
causal_ts = { path = "../causal_ts" }
Expand All @@ -51,28 +52,36 @@ engine_rocks = { path = "../engine_rocks", default-features = false }
engine_rocks_helper = { path = "../engine_rocks_helper" }
engine_traits = { path = "../engine_traits", default-features = false }
error_code = { path = "../error_code", default-features = false }
fail = "0.5"
file_system = { path = "../file_system", default-features = false }
fs2 = "0.4"
futures = "0.3"
grpcio = { version = "0.10", default-features = false, features = ["openssl-vendored"] }
grpcio-health = { version = "0.10", default-features = false, features = ["protobuf-codec"] }
hex = "0.4"

hyper = { version = "0.14", features = ["full"] }
itertools = "0.10"
keys = { path = "../keys", default-features = false }
kvproto = { git = "https://github.com/pingcap/kvproto.git" }
lazy_static = "1.3"
libc = "0.2"
log = { version = "0.4", features = ["max_level_trace", "release_max_level_debug"] }
log_wrappers = { path = "../log_wrappers" }
mime = "0.3.13"
nix = "0.23"
online_config = { path = "../online_config" }

openssl = "0.10"
pd_client = { path = "../pd_client", default-features = false }
pin-project = "1.0"
pprof = { git = "https://github.com/tikv/pprof-rs.git", rev = "a5a993a33a23557b27e633f18723366281d3b1c0", default-features = false, features = ["flamegraph", "protobuf-codec"] }
prometheus = { version = "0.13", features = ["nightly"] }
protobuf = { version = "2.8", features = ["bytes"] }
raft = { version = "0.7.0", default-features = false, features = ["protobuf-codec"] }
raft_log_engine = { path = "../raft_log_engine", default-features = false }
raftstore = { path = "../raftstore", default-features = false }
rand = "0.8"
regex = "1.3"
resolved_ts = { path = "../../components/resolved_ts", default-features = false }
resource_metering = { path = "../resource_metering" }
security = { path = "../security", default-features = false }
Expand All @@ -89,8 +98,10 @@ tikv = { path = "../..", default-features = false }
tikv_alloc = { path = "../tikv_alloc" }
tikv_util = { path = "../tikv_util", default-features = false }
tokio = { version = "1.5", features = ["rt-multi-thread"] }
tokio-openssl = "0.6"
toml = "0.5"
txn_types = { path = "../txn_types", default-features = false }
url = "2"
yatp = { git = "https://github.com/tikv/yatp.git", branch = "master" }

[target.'cfg(unix)'.dependencies]
Expand Down
10 changes: 10 additions & 0 deletions components/proxy_server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
// Copyright 2022 TiKV Project Authors. Licensed under Apache-2.0.
#![recursion_limit = "256"]

extern crate slog_global;

// For status server
#[macro_use(fail_point)]
extern crate fail;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate serde_derive;

#[macro_use]
extern crate tikv_util;

Expand All @@ -11,6 +20,7 @@ pub mod hacked_lock_mgr;
pub mod proxy;
pub mod run;
pub mod setup;
pub mod status_server;
pub mod util;

pub use server::fatal;
Expand Down
3 changes: 1 addition & 2 deletions components/proxy_server/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ use tikv::{
raftkv::ReplicaReadLockChecker,
resolve,
service::{DebugService, DiagnosticsService},
status_server::StatusServer,
ttl::TtlChecker,
KvEngineFactoryBuilder, Node, RaftKv, Server, CPU_CORES_QUOTA_GAUGE, DEFAULT_CLUSTER_ID,
GRPC_THREAD_PREFIX,
Expand All @@ -106,7 +105,7 @@ use tokio::runtime::Builder;

use crate::{
config::ProxyConfig, fatal, hacked_lock_mgr::HackedLockManager as LockManager, setup::*,
util::ffi_server_info,
status_server::StatusServer, util::ffi_server_info,
};

#[inline]
Expand Down
Loading