Skip to content

Commit

Permalink
*: remove prost support
Browse files Browse the repository at this point in the history
Since it's not used in production, remove it to reduce dependencies and
codes.

To fully remove prost, we still need pprof to support protobuf-codec.

See also tikv#10905.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
  • Loading branch information
BusyJay committed Oct 19, 2021
1 parent af738fc commit d958d7c
Show file tree
Hide file tree
Showing 89 changed files with 178 additions and 1,422 deletions.
83 changes: 47 additions & 36 deletions Cargo.lock

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

83 changes: 6 additions & 77 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition = "2018"
publish = false

[features]
default = ["protobuf-codec", "test-engines-rocksdb", "cloud-aws", "cloud-gcp"]
default = ["test-engines-rocksdb", "cloud-aws", "cloud-gcp"]
tcmalloc = ["tikv_alloc/tcmalloc"]
jemalloc = ["tikv_alloc/jemalloc", "engine_rocks/jemalloc"]
mimalloc = ["tikv_alloc/mimalloc"]
Expand All @@ -34,76 +34,6 @@ cloud-gcp = [
"encryption_export/cloud-gcp",
"sst_importer/cloud-gcp",
]
protobuf-codec = [
"protobuf/bytes",
"batch-system/protobuf-codec",
"codec/protobuf-codec",
"concurrency_manager/protobuf-codec",
"encryption_export/protobuf-codec",
"engine_panic/protobuf-codec",
"engine_rocks/protobuf-codec",
"engine_test/protobuf-codec",
"engine_traits/protobuf-codec",
"engine_traits_tests/protobuf-codec",
"error_code/protobuf-codec",
"grpcio/protobuf-codec",
"into_other/protobuf-codec",
"keys/protobuf-codec",
"kvproto/protobuf-codec",
"pd_client/protobuf-codec",
"raft/protobuf-codec",
"raftstore/protobuf-codec",
"raft_log_engine/protobuf-codec",
"security/protobuf-codec",
"sst_importer/protobuf-codec",
"tidb_query_aggr/protobuf-codec",
"tidb_query_common/protobuf-codec",
"tidb_query_datatype/protobuf-codec",
"tidb_query_executors/protobuf-codec",
"tidb_query_expr/protobuf-codec",
"tipb/protobuf-codec",
"tikv_kv/protobuf-codec",
"tikv_util/protobuf-codec",
"txn_types/protobuf-codec",
"grpcio-health/protobuf-codec",
"file_system/protobuf-codec",
"resource_metering/protobuf-codec",
"protobuf/bytes",
]
prost-codec = [
"batch-system/prost-codec",
"codec/prost-codec",
"concurrency_manager/prost-codec",
"encryption_export/prost-codec",
"engine_panic/prost-codec",
"engine_rocks/prost-codec",
"engine_test/prost-codec",
"engine_traits/prost-codec",
"engine_traits_tests/prost-codec",
"error_code/prost-codec",
"grpcio/prost-codec",
"into_other/prost-codec",
"keys/prost-codec",
"kvproto/prost-codec",
"pd_client/prost-codec",
"raft/prost-codec",
"raftstore/prost-codec",
"raft_log_engine/prost-codec",
"security/prost-codec",
"sst_importer/prost-codec",
"tidb_query_aggr/prost-codec",
"tidb_query_common/prost-codec",
"tidb_query_datatype/prost-codec",
"tidb_query_executors/prost-codec",
"tidb_query_expr/prost-codec",
"tipb/prost-codec",
"tikv_kv/prost-codec",
"tikv_util/prost-codec",
"txn_types/prost-codec",
"grpcio-health/prost-codec",
"file_system/prost-codec",
"resource_metering/prost-codec",
]
testexport = ["raftstore/testexport"]
test-engines-rocksdb = [
"engine_test/test-engines-rocksdb",
Expand Down Expand Up @@ -152,8 +82,8 @@ fs2 = "0.4"
futures = { version = "0.3", features = ["thread-pool", "compat"] }
futures-executor = "0.3.1"
futures-util = { version = "0.3.1", default-features = false, features = ["io", "async-await"] }
grpcio = { version = "0.9", default-features = false, features = ["openssl-vendored"] }
grpcio-health = { version = "0.9", default-features = false }
grpcio = { version = "0.9", default-features = false, features = ["openssl-vendored", "protobuf-codec"] }
grpcio-health = { version = "0.9", default-features = false, features = ["protobuf-codec"] }
hex = "0.4"
hyper-tls = "0.5"
itertools = "0.10"
Expand All @@ -163,7 +93,7 @@ hyper-openssl = "0.9"
http = "0"
into_other = { path = "components/into_other", default-features = false }
keys = { path = "components/keys", default-features = false }
kvproto = { git = "https://github.com/pingcap/kvproto.git", default-features = false }
kvproto = { git = "https://github.com/pingcap/kvproto.git" }
lazy_static = "1.3"
libc = "0.2"
libloading = "0.7"
Expand All @@ -179,10 +109,9 @@ num_cpus = "1"
pd_client = { path = "components/pd_client", default-features = false }
pin-project = "1.0"
pnet_datalink = "0.23"
prost = "0.7"
pprof = { version = "^0.4", default-features = false, features = ["flamegraph", "protobuf"] }
protobuf = "2.8"
raft = { version = "0.6.0-alpha", default-features = false }
protobuf = { version = "2.8", features = ["bytes"] }
raft = { version = "0.6.0-alpha" }
raftstore = { path = "components/raftstore", default-features = false }
raft_log_engine = { path = "components/raft_log_engine", default-features = false }
rand = "0.7.3"
Expand Down
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ ifeq ($(BCC_IOSNOOP),1)
ENABLE_FEATURES += bcc-iosnoop
endif

# Use Prost instead of rust-protobuf to encode and decode protocol buffers.
ifeq ($(PROST),1)
ENABLE_FEATURES += prost-codec
else
ENABLE_FEATURES += protobuf-codec
endif

# Set the storage engines used for testing
ifneq ($(NO_DEFAULT_TEST_ENGINES),1)
ENABLE_FEATURES += test-engines-rocksdb
Expand Down Expand Up @@ -328,7 +321,7 @@ ctl:
# Actually use make to track dependencies! This saves half a second.
error_code_files := $(shell find $(PROJECT_DIR)/components/error_code/ -type f )
etc/error_code.toml: $(error_code_files)
cargo run --manifest-path components/error_code/Cargo.toml --features protobuf-codec
cargo run --manifest-path components/error_code/Cargo.toml

error-code: etc/error_code.toml

Expand Down

0 comments on commit d958d7c

Please sign in to comment.