mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-05 20:42:54 +00:00
Refactors Compute::prepare_and_run. It's split into subroutines differently, to make it easier to attach tracing spans to the different stages. The high-level logic for waiting for Postgres to exit is moved to the caller. Replace 'env_logger' with 'tracing', and add `#instrument` directives to different stages fo the startup process. This is a fairly mechanical change, except for the changes in 'spec.rs'. 'spec.rs' contained some complicated formatting, where parts of log messages were printed directly to stdout with `print`s. That was a bit messed up because the log normally goes to stderr, but those lines were printed to stdout. In our docker images, stderr and stdout both go to the same place so you wouldn't notice, but I don't think it was intentional. This changes the log format to the default 'tracing_subscriber::format' format. It's different from the Postgres log format, however, and because both compute_tools and Postgres print to the same log, it's now a mix of two different formats. I'm not sure how the Grafana log parsing pipeline can handle that. If it's a problem, we can build custom formatter to change the compute_tools log format to be the same as Postgres's, like it was before this commit, or we can change the Postgres log format to match tracing_formatter's, or we can start printing compute_tool's log output to a different destination than Postgres
68 lines
3.0 KiB
TOML
68 lines
3.0 KiB
TOML
# This file is generated by `cargo hakari`.
|
|
# To regenerate, run:
|
|
# cargo hakari generate
|
|
|
|
[package]
|
|
name = "workspace_hack"
|
|
version = "0.1.0"
|
|
description = "workspace-hack package, managed by hakari"
|
|
# You can choose to publish this crate: see https://docs.rs/cargo-hakari/latest/cargo_hakari/publishing.
|
|
publish = false
|
|
# The parts of the file between the BEGIN HAKARI SECTION and END HAKARI SECTION comments
|
|
# are managed by hakari.
|
|
|
|
### BEGIN HAKARI SECTION
|
|
[dependencies]
|
|
anyhow = { version = "1", features = ["backtrace"] }
|
|
bytes = { version = "1", features = ["serde"] }
|
|
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
|
|
clap = { version = "4", features = ["derive", "string"] }
|
|
crossbeam-utils = { version = "0.8" }
|
|
either = { version = "1" }
|
|
fail = { version = "0.5", default-features = false, features = ["failpoints"] }
|
|
futures-channel = { version = "0.3", features = ["sink"] }
|
|
futures-task = { version = "0.3", default-features = false, features = ["std"] }
|
|
futures-util = { version = "0.3", features = ["channel", "io", "sink"] }
|
|
indexmap = { version = "1", default-features = false, features = ["std"] }
|
|
itertools = { version = "0.10" }
|
|
libc = { version = "0.2", features = ["extra_traits"] }
|
|
log = { version = "0.4", default-features = false, features = ["std"] }
|
|
memchr = { version = "2" }
|
|
nom = { version = "7" }
|
|
num-bigint = { version = "0.4" }
|
|
num-integer = { version = "0.1", features = ["i128"] }
|
|
num-traits = { version = "0.2", features = ["i128", "libm"] }
|
|
prost = { version = "0.11" }
|
|
rand = { version = "0.8", features = ["small_rng"] }
|
|
regex = { version = "1" }
|
|
regex-syntax = { version = "0.6" }
|
|
scopeguard = { version = "1" }
|
|
serde = { version = "1", features = ["alloc", "derive"] }
|
|
serde_json = { version = "1", features = ["raw_value"] }
|
|
socket2 = { version = "0.4", default-features = false, features = ["all"] }
|
|
tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "net", "process", "rt-multi-thread", "sync", "time"] }
|
|
tokio-util = { version = "0.7", features = ["codec", "io"] }
|
|
tower = { version = "0.4", features = ["balance", "buffer", "limit", "retry", "timeout", "util"] }
|
|
tracing = { version = "0.1", features = ["log"] }
|
|
tracing-core = { version = "0.1" }
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
|
url = { version = "2", features = ["serde"] }
|
|
|
|
[build-dependencies]
|
|
anyhow = { version = "1", features = ["backtrace"] }
|
|
bytes = { version = "1", features = ["serde"] }
|
|
either = { version = "1" }
|
|
indexmap = { version = "1", default-features = false, features = ["std"] }
|
|
itertools = { version = "0.10" }
|
|
libc = { version = "0.2", features = ["extra_traits"] }
|
|
log = { version = "0.4", default-features = false, features = ["std"] }
|
|
memchr = { version = "2" }
|
|
nom = { version = "7" }
|
|
prost = { version = "0.11" }
|
|
regex = { version = "1" }
|
|
regex-syntax = { version = "0.6" }
|
|
serde = { version = "1", features = ["alloc", "derive"] }
|
|
syn = { version = "1", features = ["extra-traits", "full", "visit", "visit-mut"] }
|
|
|
|
### END HAKARI SECTION
|