Skip to content

Commit

Permalink
refactor: move databend-meta binaries to separate dir (databendlabs#1…
Browse files Browse the repository at this point in the history
…5803)

Building databend-meta does not rely on databend-query.
Moving it out of `src/binaries` speed up databend-meta building.
  • Loading branch information
drmingdrmer authored Jun 16, 2024
1 parent 303f713 commit 4d6a3ae
Show file tree
Hide file tree
Showing 17 changed files with 127 additions and 75 deletions.
49 changes: 32 additions & 17 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ members = [
"src/query/ee",
"src/meta/api",
"src/meta/app",
"src/meta/binaries",
"src/meta/client",
"src/meta/embedded",
"src/meta/kvapi",
Expand Down
2 changes: 1 addition & 1 deletion licenserc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ excludes = [

# licensed under Elastic License 2.0
"src/binaries/query/ee_main.rs",
"src/binaries/meta/ee_main.rs",
"src/meta/binaries/meta/ee_main.rs",
"src/meta/ee",
"src/query/ee",

Expand Down
54 changes: 1 addition & 53 deletions src/binaries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,91 +10,39 @@ edition = { workspace = true }
[features]
default = ["simd", "jemalloc"]
memory-profiling = [
"databend-meta/memory-profiling",
"databend-query/memory-profiling",
"databend-common-base/memory-profiling",
]
python-udf = ["databend-query/python-udf"]
simd = ["databend-meta/simd", "databend-query/simd"]
simd = ["databend-query/simd"]
jemalloc = ["databend-common-base/jemalloc"]
io-uring = [
"databend-meta/io-uring",
"databend-query/io-uring",
"databend-common-meta-store/io-uring",
"databend-common-meta-sled-store/io-uring",
"databend-common-meta-raft-store/io-uring",
]

[dependencies]
anyerror = { workspace = true }
anyhow = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true }
databend-common-base = { workspace = true }
databend-common-config = { workspace = true }
databend-common-exception = { workspace = true }
databend-common-grpc = { workspace = true }
databend-common-license = { workspace = true }
databend-common-meta-api = { workspace = true }
databend-common-meta-app = { workspace = true }
databend-common-meta-client = { workspace = true }
databend-common-meta-kvapi = { workspace = true }
databend-common-meta-raft-store = { workspace = true }
databend-common-meta-sled-store = { workspace = true }
databend-common-meta-store = { workspace = true }
databend-common-meta-types = { workspace = true }
databend-common-metrics = { workspace = true }
databend-common-storage = { workspace = true }
databend-common-tracing = { workspace = true }
databend-enterprise-background-service = { workspace = true }
databend-enterprise-query = { workspace = true }
databend-meta = { workspace = true }
databend-query = { workspace = true }
databend-sharing-endpoint = { workspace = true }
databend-storages-common-table-meta = { workspace = true }
futures = { workspace = true }
limits-rs = "0.2.0"
log = { workspace = true }
minitrace = { workspace = true }
opendal = { workspace = true }
poem = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serfig = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
url = "2.3.1"

[[bin]]
name = "databend-meta"
path = "meta/ee_main.rs"
doctest = false
test = false

[[bin]]
name = "databend-meta-oss"
path = "meta/oss_main.rs"
doctest = false
test = false

[[bin]]
name = "databend-metabench"
path = "metabench/main.rs"
doctest = false
test = false

[[bin]]
name = "databend-metactl"
path = "metactl/main.rs"
doctest = false
test = false

[[bin]]
name = "databend-metaverifier"
path = "metaverifier/main.rs"
doctest = false
test = false

[[bin]]
name = "databend-query"
Expand Down
4 changes: 0 additions & 4 deletions src/binaries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@

Contains all databend binaries:

- [`meta`](./meta/) -> `databend-meta`, the meta service binary of Databend.
- [`metabench`](./metabench/) -> `databend-metabench`, run meta benchmark.
- [`metactl`](./metactl/) -> `databend-metactl`, dump data in json from a sled db.
- [`query`](./query/) -> `databend-query`, the query service binary of Databend.
- [`opensharing`](./opensharing/) -> `open-sharing`, tenant level sharing endpoint used in stateful test
- [`table-meta-inspector`](./tool/table_meta_inspector.rs) -> `table-meta-inspector`, tools for decoding the v3 table meta
84 changes: 84 additions & 0 deletions src/meta/binaries/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[package]
name = "databend-meta-binaries"
description = "databend-meta command line tools"
version = { workspace = true }
authors = { workspace = true }
license = { workspace = true }
publish = { workspace = true }
edition = { workspace = true }

[features]
default = ["simd", "jemalloc"]
memory-profiling = [
"databend-meta/memory-profiling",
"databend-common-base/memory-profiling",
]
simd = ["databend-meta/simd"]
jemalloc = ["databend-common-base/jemalloc"]
io-uring = [
"databend-meta/io-uring",
"databend-common-meta-store/io-uring",
"databend-common-meta-sled-store/io-uring",
"databend-common-meta-raft-store/io-uring",
]

[dependencies]
anyerror = { workspace = true }
anyhow = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true }
databend-common-base = { workspace = true }
databend-common-exception = { workspace = true }
databend-common-grpc = { workspace = true }
databend-common-meta-api = { workspace = true }
databend-common-meta-app = { workspace = true }
databend-common-meta-client = { workspace = true }
databend-common-meta-kvapi = { workspace = true }
databend-common-meta-raft-store = { workspace = true }
databend-common-meta-sled-store = { workspace = true }
databend-common-meta-store = { workspace = true }
databend-common-meta-types = { workspace = true }
databend-common-tracing = { workspace = true }
databend-meta = { workspace = true }
futures = { workspace = true }
log = { workspace = true }
minitrace = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
url = "2.3.1"

[[bin]]
name = "databend-meta"
path = "meta/ee_main.rs"
doctest = false
test = false

[[bin]]
name = "databend-meta-oss"
path = "meta/oss_main.rs"
doctest = false
test = false

[[bin]]
name = "databend-metabench"
path = "metabench/main.rs"
doctest = false
test = false

[[bin]]
name = "databend-metactl"
path = "metactl/main.rs"
doctest = false
test = false

[[bin]]
name = "databend-metaverifier"
path = "metaverifier/main.rs"
doctest = false
test = false

[lints]
workspace = true
8 changes: 8 additions & 0 deletions src/meta/binaries/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Databend Binaries

Contains all databend binaries:

- [`meta`](./meta/) -> `databend-meta`, the meta service binary of Databend.
- [`metabench`](./metabench/) -> `databend-metabench`, run meta benchmark.
- [`metactl`](./metactl/) -> `databend-metactl`, dump data in json from a sled db.
- [`table-meta-inspector`](./tool/table_meta_inspector.rs) -> `table-meta-inspector`, tools for decoding the v3 table meta
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4d6a3ae

Please sign in to comment.