2022-11-24 14:26:34 +00:00
|
|
|
[package]
|
2023-05-05 16:03:50 +00:00
|
|
|
name = "ingester"
|
2022-11-24 14:26:34 +00:00
|
|
|
version.workspace = true
|
|
|
|
authors.workspace = true
|
|
|
|
edition.workspace = true
|
|
|
|
license.workspace = true
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
arrow = { workspace = true, features = ["prettyprint"] }
|
|
|
|
arrow_util = { version = "0.1.0", path = "../arrow_util" }
|
2023-04-12 10:35:26 +00:00
|
|
|
arrow-flight = { workspace = true }
|
feat(ingester2): optimal persist parallelism
This commit changes the behaviour of the persist system to enable
optimal parallelism of persist operations, and improve the accuracy of
the outstanding job bound / back-pressure.
Previously all persist operations for a given partition were
consistently hashed to a single worker task. This serialised persistence
per partition, ensuring all updates to the partition sort key were
serialised. However, this also unnecessarily serialises persist
operations that do not need to update the sort key, reducing the
potential throughput of the system; in the worst case of a single
partition receiving all the writes, only one worker would be persisting,
and the other N-1 workers would be idle.
After this change, the sort key is inspected when enqueuing the persist
operation and if it can be determined that no sort key update is
necessary (the typical case), then the persist task is placed into a
global work queue from which all workers consume. This allows for
maximal parallelisation of these jobs, and the removes the per-worker
head-of-line blocking.
In the case that the sort key does need updating, these jobs continue to
be consistently hashed to a single worker, ensuring serialised sort key
updates only where necessary.
To support these changes, the back-pressure system has been changed to
account for all outstanding persist jobs in the system, regardless of
type or assigned worker - a logical, bounded queue is composed together
of a semaphore limiting the number of persist tasks overall, and a
series of physical, unbounded queues - one to each worker & the global
queue. The overall system remains bounded by the
INFLUXDB_IOX_PERSIST_QUEUE_DEPTH value, and is now simpler to reason
about (it is independent of the number of workers, etc).
2022-12-15 14:14:23 +00:00
|
|
|
async-channel = "1.8.0"
|
2023-03-30 10:14:36 +00:00
|
|
|
async-trait = "0.1.68"
|
2022-11-24 14:26:34 +00:00
|
|
|
backoff = { version = "0.1.0", path = "../backoff" }
|
2023-02-01 00:30:56 +00:00
|
|
|
bytes = "1.4.0"
|
2023-03-01 10:16:09 +00:00
|
|
|
crossbeam-utils = "0.8.15"
|
2022-11-24 14:26:34 +00:00
|
|
|
data_types = { version = "0.1.0", path = "../data_types" }
|
2023-04-12 10:35:26 +00:00
|
|
|
datafusion.workspace = true
|
2022-11-24 14:26:34 +00:00
|
|
|
dml = { version = "0.1.0", path = "../dml" }
|
2023-02-06 11:35:39 +00:00
|
|
|
flatbuffers = "23.1.21"
|
2023-03-31 10:44:23 +00:00
|
|
|
futures = "0.3.28"
|
2022-11-24 14:26:34 +00:00
|
|
|
generated_types = { version = "0.1.0", path = "../generated_types" }
|
|
|
|
hashbrown.workspace = true
|
2023-05-12 15:35:29 +00:00
|
|
|
ingester_query_grpc = { path = "../ingester_query_grpc" }
|
2022-11-24 14:26:34 +00:00
|
|
|
iox_catalog = { version = "0.1.0", path = "../iox_catalog" }
|
|
|
|
iox_query = { version = "0.1.0", path = "../iox_query" }
|
|
|
|
iox_time = { path = "../iox_time" }
|
|
|
|
metric = { version = "0.1.0", path = "../metric" }
|
|
|
|
mutable_batch = { version = "0.1.0", path = "../mutable_batch" }
|
|
|
|
mutable_batch_pb = { version = "0.1.0", path = "../mutable_batch_pb" }
|
|
|
|
observability_deps = { version = "0.1.0", path = "../observability_deps" }
|
2023-01-02 17:07:15 +00:00
|
|
|
once_cell = "1.17"
|
2022-11-24 14:26:34 +00:00
|
|
|
parking_lot = "0.12.1"
|
2022-12-01 09:37:25 +00:00
|
|
|
parquet_file = { version = "0.1.0", path = "../parquet_file" }
|
2023-05-15 02:02:32 +00:00
|
|
|
pin-project = "1.1.0"
|
2022-11-24 14:26:34 +00:00
|
|
|
predicate = { version = "0.1.0", path = "../predicate" }
|
2023-04-13 10:27:15 +00:00
|
|
|
prost = { version = "0.11.9", default-features = false, features = ["std"] }
|
2022-11-24 14:26:34 +00:00
|
|
|
rand = "0.8.5"
|
|
|
|
schema = { version = "0.1.0", path = "../schema" }
|
|
|
|
service_grpc_catalog = { version = "0.1.0", path = "../service_grpc_catalog" }
|
2022-12-01 09:37:25 +00:00
|
|
|
sharder = { version = "0.1.0", path = "../sharder" }
|
2022-12-22 15:53:48 +00:00
|
|
|
test_helpers = { path = "../test_helpers", features = ["future_timeout"], optional = true }
|
2023-04-12 10:35:26 +00:00
|
|
|
thiserror = "1.0.40"
|
2023-04-26 12:53:26 +00:00
|
|
|
tokio = { version = "1.28", features = ["macros", "parking_lot", "rt-multi-thread", "sync", "time"] }
|
2023-04-26 09:24:39 +00:00
|
|
|
tokio-util = "0.7.8"
|
2023-04-12 16:07:19 +00:00
|
|
|
tonic = { workspace = true }
|
2022-11-24 14:26:34 +00:00
|
|
|
trace = { version = "0.1.0", path = "../trace" }
|
2023-05-16 02:00:24 +00:00
|
|
|
uuid = "1.3.3"
|
2022-11-28 22:09:03 +00:00
|
|
|
wal = { version = "0.1.0", path = "../wal" }
|
2023-02-24 18:02:23 +00:00
|
|
|
workspace-hack = { version = "0.1", path = "../workspace-hack" }
|
2022-11-24 14:26:34 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
assert_matches = "1.5.0"
|
2022-12-12 13:24:11 +00:00
|
|
|
criterion = { version = "0.4", default-features = false, features = ["async_tokio"]}
|
2022-11-24 14:26:34 +00:00
|
|
|
datafusion_util = { path = "../datafusion_util" }
|
2023-04-12 10:35:26 +00:00
|
|
|
influxdb_iox_client = { path = "../influxdb_iox_client" }
|
2023-05-09 00:23:02 +00:00
|
|
|
ingester_test_ctx = { path = "../ingester_test_ctx" }
|
2022-11-24 14:26:34 +00:00
|
|
|
lazy_static = "1.4.0"
|
|
|
|
mutable_batch_lp = { path = "../mutable_batch_lp" }
|
2023-05-22 13:08:20 +00:00
|
|
|
object_store = "0.5.6"
|
2023-03-06 10:40:41 +00:00
|
|
|
paste = "1.0.12"
|
2023-03-30 11:15:54 +00:00
|
|
|
tempfile = "3.5.0"
|
2022-11-24 14:26:34 +00:00
|
|
|
test_helpers = { path = "../test_helpers", features = ["future_timeout"] }
|
2023-04-26 12:53:26 +00:00
|
|
|
tokio = { version = "1.28", features = ["macros", "time", "test-util"] }
|
2022-12-12 13:24:11 +00:00
|
|
|
|
|
|
|
[features]
|
2023-04-12 10:35:26 +00:00
|
|
|
# Export some internal types for benchmark purposes only.
|
|
|
|
benches = ["test_helpers"]
|
2022-12-12 13:24:11 +00:00
|
|
|
|
|
|
|
[lib]
|
|
|
|
bench = false
|
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
name = "wal"
|
|
|
|
harness = false
|
|
|
|
# Require some internal types be made visible for benchmark code.
|
|
|
|
required-features = ["benches"]
|
2023-04-12 10:38:05 +00:00
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
name = "write"
|
|
|
|
harness = false
|
|
|
|
# Require some internal types be made visible for benchmark code.
|