From aaec1c7828139e47296665c84aeea4c974026118 Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Mon, 7 Mar 2022 15:44:13 +0000 Subject: [PATCH] build: propagate feature flags to influxdb_ioxd When you did a "cargo build --no-default-features" before this commit, the influxdb_iox crate was compiled without the default features (namely jemalloc stuff) but the influxdb_ioxd crate was compiled with jemalloc (it was not possible to compile without jemalloc support). This commit fixes propagation of the jemalloc flag ("jemalloc_replacing_malloc") into the influxdb_ioxd crate. --- influxdb_iox/Cargo.toml | 4 ++-- influxdb_ioxd/Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/influxdb_iox/Cargo.toml b/influxdb_iox/Cargo.toml index 86f5b6d822..8ba51f95ed 100644 --- a/influxdb_iox/Cargo.toml +++ b/influxdb_iox/Cargo.toml @@ -15,7 +15,7 @@ datafusion = { path = "../datafusion" } db = { path = "../db" } dml = { path = "../dml" } generated_types = { path = "../generated_types" } -influxdb_ioxd = { path = "../influxdb_ioxd" } +influxdb_ioxd = { path = "../influxdb_ioxd", default-features = false } influxdb_iox_client = { path = "../influxdb_iox_client", features = ["flight", "format", "write_lp"] } influxdb_storage_client = { path = "../influxdb_storage_client" } influxdb_line_protocol = { path = "../influxdb_line_protocol" } @@ -133,7 +133,7 @@ aws = ["object_store/aws"] # Optional AWS / S3 object store support # runtime overhead on all allocations (calls to malloc). # Cargo cannot currently implement mutually exclusive features so let's force every build # to pick either heappy or jemalloc_replacing_malloc feature at least until we figure out something better. -jemalloc_replacing_malloc = ["tikv-jemalloc-sys", "tikv-jemalloc-ctl"] +jemalloc_replacing_malloc = ["tikv-jemalloc-sys", "tikv-jemalloc-ctl", "influxdb_ioxd/jemalloc_replacing_malloc"] # Implicit feature selected when running under `clippy --all-features` to accept mutable exclusive features during # linting diff --git a/influxdb_ioxd/Cargo.toml b/influxdb_ioxd/Cargo.toml index 900946aee6..9cddd67282 100644 --- a/influxdb_ioxd/Cargo.toml +++ b/influxdb_ioxd/Cargo.toml @@ -84,7 +84,7 @@ serde_json = "1.0.79" serde_urlencoded = "0.7.0" snafu = "0.7" thiserror = "1.0.30" -tikv-jemalloc-ctl = { version = "0.4.0" } +tikv-jemalloc-ctl = { version = "0.4.0", optional = true } tokio = { version = "1.17", features = ["macros", "net", "parking_lot", "rt-multi-thread", "signal", "sync", "time"] } tokio-stream = { version = "0.1", features = ["net"] } tokio-util = { version = "0.7.0" } @@ -126,7 +126,7 @@ aws = ["object_store/aws"] # Optional AWS / S3 object store support # runtime overhead on all allocations (calls to malloc). # Cargo cannot currently implement mutually exclusive features so let's force every build # to pick either heappy or jemalloc_replacing_malloc feature at least until we figure out something better. -jemalloc_replacing_malloc = ["tikv-jemalloc-sys"] +jemalloc_replacing_malloc = ["tikv-jemalloc-sys", "tikv-jemalloc-ctl"] # Implicit feature selected when running under `clippy --all-features` to accept mutable exclusive features during # linting