Skip to content

Commit 5ae9694

Browse files
authored
Merge branch 'master' into feature/memory-enrichment-table-cuckoo-filter
2 parents d15eca9 + 1821290 commit 5ae9694

49 files changed

Lines changed: 2970 additions & 40 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
.github/workflows/regression.yml @vectordotdev/vector @vectordotdev/single-machine-performance
44
regression/config.yaml @vectordotdev/vector @vectordotdev/single-machine-performance
55

6+
tests/antithesis/ @vectordotdev/vector @vectordotdev/single-machine-performance
7+
68
website/ @vectordotdev/vector
79
website/js @vectordotdev/vector @vectordotdev/vector-website
810
website/layouts @vectordotdev/vector @vectordotdev/vector-website

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ volumes/
6262
# Environment variable files (can contain secrets)
6363
*.env
6464
.env.*
65+
!tests/antithesis/scenarios/*/launch.env
6566

6667
# LLM tools
6768
copilot-instructions.md
@@ -76,3 +77,9 @@ local/
7677
.claude/skill-reports/
7778
# Local Claude Code settings (machine-specific permissions)
7879
.claude/settings.local.json
80+
81+
# antithesis scratchbook (private knowledge store)
82+
/tests/antithesis/scratchbook/
83+
84+
# stray rlib build artifacts
85+
*.rlib

Cargo.lock

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,18 @@ members = [
132132
"lib/vector-vrl/metrics",
133133
"lib/vector-vrl/tests",
134134
"lib/vector-vrl/web-playground",
135+
"tests/antithesis/harness",
135136
"vdev",
136137
]
137138

138139
[workspace.dependencies]
140+
antithesis-instrumentation = { version = "0.1", default-features = false, features = [] }
141+
antithesis_sdk = { version = "0.2", default-features = false, features = [] }
139142
anyhow = { version = "1.0.102", default-features = false, features = ["std"] }
140143
arc-swap = { version = "1.8.2", default-features = false }
141144
async-stream = { version = "0.3.6", default-features = false }
142145
async-trait = { version = "0.1.89", default-features = false }
146+
axum = { version = "0.6.20", default-features = false }
143147
base64 = { version = "0.22.1", default-features = false }
144148
bytes = { version = "1.11.1", default-features = false, features = ["serde"] }
145149
cfg-if = { version = "1.0.4", default-features = false }
@@ -213,6 +217,7 @@ tracing = { version = "0.1.44", default-features = false }
213217
tracing-subscriber = { version = "0.3.22", default-features = false, features = ["fmt"] }
214218
url = { version = "2.5.4", default-features = false, features = ["serde"] }
215219
uuid = { version = "1.22.0", features = ["v4", "v7", "serde", "fast-rng"] }
220+
vector-buffers = { path = "lib/vector-buffers" }
216221
vector-config = { path = "lib/vector-config" }
217222
vector-config-common = { path = "lib/vector-config-common" }
218223
vector-config-macros = { path = "lib/vector-config-macros" }
@@ -482,6 +487,8 @@ tikv-jemallocator = { version = "0.7.0", default-features = false, features = ["
482487

483488
[target.'cfg(target_os = "linux")'.dependencies]
484489
procfs = { version = "0.18.0", default-features = false }
490+
# antithesis-instrumentation links a native .a via ELF .init_array -- Linux only.
491+
antithesis-instrumentation = { workspace = true, optional = true }
485492

486493
[build-dependencies]
487494
prost-build = { workspace = true, optional = true }
@@ -530,6 +537,8 @@ ntapi = { git = "https://github.com/MSxDOS/ntapi.git", rev = "24fc1e47677fc9f6e3
530537
# table below). Local dev builds skip it so they don't need `libsasl2-dev` / cyrus-sasl
531538
# installed, and so rdkafka's build script doesn't link GSSAPI.
532539
default = ["enable-unix"]
540+
antithesis-scenario-memory = ["dep:antithesis-instrumentation"]
541+
antithesis-scenario-disk = ["dep:antithesis-instrumentation", "vector-lib/antithesis-disk-asserts"]
533542
# Default features for `cargo docs`. We're not using `gssapi` which would require installing libsasl2 in our doc environment.
534543
docs = ["enable-unix"]
535544
# Default features for *-unknown-linux-* which make use of `cmake` for dependencies

LICENSE-3rdparty.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ anstyle,https://github.com/rust-cli/anstyle,MIT OR Apache-2.0,The anstyle Author
1818
anstyle-parse,https://github.com/rust-cli/anstyle,MIT OR Apache-2.0,The anstyle-parse Authors
1919
anstyle-query,https://github.com/rust-cli/anstyle,MIT OR Apache-2.0,The anstyle-query Authors
2020
anstyle-wincon,https://github.com/rust-cli/anstyle,MIT OR Apache-2.0,The anstyle-wincon Authors
21+
antithesis-instrumentation,https://github.com/antithesishq/antithesis-instrumentation-rust,MIT,The antithesis-instrumentation Authors
22+
antithesis_sdk,https://github.com/antithesishq/antithesis-sdk-rust,MIT,The antithesis_sdk Authors
2123
anyhow,https://github.com/dtolnay/anyhow,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
2224
apache-avro,https://github.com/apache/avro-rs,Apache-2.0,The apache-avro Authors
2325
arbitrary,https://github.com/rust-fuzz/arbitrary,MIT OR Apache-2.0,"The Rust-Fuzz Project Developers, Nick Fitzgerald <fitzgen@gmail.com>, Manish Goregaokar <manishsmail@gmail.com>, Simonas Kazlauskas <arbitrary@kazlauskas.me>, Brian L. Troutwine <brian@troutwine.us>, Corey Farwell <coreyf@rwell.org>"
@@ -433,13 +435,16 @@ lexical-util,https://github.com/Alexhuszagh/rust-lexical,MIT OR Apache-2.0,Alex
433435
lexical-write-float,https://github.com/Alexhuszagh/rust-lexical,MIT OR Apache-2.0,Alex Huszagh <ahuszagh@gmail.com>
434436
lexical-write-integer,https://github.com/Alexhuszagh/rust-lexical,MIT OR Apache-2.0,Alex Huszagh <ahuszagh@gmail.com>
435437
libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The Rust Project Developers
438+
libloading,https://github.com/nagisa/rust_libloading,ISC,Simonas Kazlauskas <libloading@kazlauskas.me>
436439
libm,https://github.com/rust-lang/libm,MIT OR Apache-2.0,Jorge Aparicio <jorge@japaric.io>
437440
libredox,https://gitlab.redox-os.org/redox-os/libredox,MIT,4lDO2 <4lDO2@protonmail.com>
438441
libsqlite3-sys,https://github.com/rusqlite/rusqlite,MIT,The rusqlite developers
439442
libz-sys,https://github.com/rust-lang/libz-sys,MIT OR Apache-2.0,"Alex Crichton <alex@alexcrichton.com>, Josh Triplett <josh@joshtriplett.org>, Sebastian Thiel <sebastian.thiel@icloud.com>"
440443
line-clipping,https://github.com/joshka/line-clipping,MIT OR Apache-2.0,Josh McKinney
441444
linked-hash-map,https://github.com/contain-rs/linked-hash-map,MIT OR Apache-2.0,"Stepan Koltsov <stepan.koltsov@gmail.com>, Andrew Paseltiner <apaseltiner@gmail.com>"
442445
linked_hash_set,https://github.com/alexheretic/linked-hash-set,Apache-2.0,Alex Butler <alexheretic@gmail.com>
446+
linkme,https://github.com/dtolnay/linkme,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
447+
linkme-impl,https://github.com/dtolnay/linkme,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
443448
linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,Dan Gohman <dev@sunfishcode.online>
444449
listenfd,https://github.com/mitsuhiko/listenfd,Apache-2.0,Armin Ronacher <armin.ronacher@active-4.com>
445450
litemap,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Add support for optionally applying rate limiting to the `internal_logs` source controlled by the
2+
`--internal-logs-source-rate-limit` CLI option and `VECTOR_INTERNAL_LOGS_SOURCE_RATE_LIMIT`
3+
environment variable. This provides the same rate limiting functionality as was available before
4+
version 0.51.1 but with a rate limit window separate from the console one.
5+
6+
authors: bruceg

docs/DEVELOPING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ to detect common problems.
264264

265265
### Disabling internal log rate limiting
266266

267-
Vector rate limits its own internal logs by default (10-second windows). During development, you may want to see all log occurrences.
267+
Vector rate limits the console output of internal logs by default (10-second windows). During
268+
development, you may want to see all log occurrences.
268269

269270
**Globally** (CLI flag or environment variable):
270271

@@ -284,6 +285,10 @@ warn!(message = "Error occurred.", %error, internal_log_rate_limit = false);
284285
info!(message = "Processing batch.", batch_size, internal_log_rate_secs = 1);
285286
```
286287

288+
Note: The `internal_logs` source is _not_ rate limited by default. To enable rate limiting on all
289+
such sources, set the `--internal-logs-source-rate-limit` CLI flag or
290+
`VECTOR_INTERNAL_LOGS_SOURCE_RATE_LIMIT` environment variable to an integer number of seconds.
291+
287292
## Testing
288293

289294
Testing is very important since Vector's primary design principle is reliability.

lib/tracing-limit/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
//! - **3rd+ occurrences**: Silent until window expires
1414
//! - **After window**: Emits a summary of suppressed count, then next event normally
1515
//!
16+
//! Note: the suppressed-count summary and the resumption of normal emission are both
17+
//! triggered by the *next arriving event* after the window has elapsed, not by the
18+
//! window expiry itself. If the event stops firing, no summary is ever emitted.
19+
//!
1620
//! # Rate limit grouping
1721
//!
1822
//! Events are rate limited independently based on a combination of:
@@ -163,6 +167,7 @@ where
163167
/// - 1st occurrence: Emitted normally
164168
/// - 2nd occurrence: Shows "suppressing" warning
165169
/// - 3rd+ occurrences: Silent until window expires
170+
/// - After window: Summary and next event emitted on next arrival (see module-level note)
166171
pub fn with_default_limit(mut self, internal_log_rate_limit: u64) -> Self {
167172
self.internal_log_rate_limit = internal_log_rate_limit;
168173
self

lib/vector-buffers/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ vector-config = { path = "../vector-config", default-features = false }
3434
vector-common = { path = "../vector-common", default-features = false, features = ["byte_size_of"] }
3535
dashmap.workspace = true
3636
ordered-float.workspace = true
37+
antithesis_sdk = { workspace = true, optional = true, features = ["full"] }
38+
serde_json = { workspace = true, optional = true }
39+
40+
[features]
41+
antithesis-disk-asserts = ["dep:antithesis_sdk", "dep:serde_json"]
42+
test = []
3743

3844
[dev-dependencies]
3945
clap.workspace = true
@@ -45,6 +51,7 @@ metrics-util = { workspace = true, features = ["debugging"] }
4551
proptest.workspace = true
4652
quickcheck.workspace = true
4753
rand.workspace = true
54+
serde_json.workspace = true
4855
serde_yaml.workspace = true
4956
temp-dir = "0.1.16"
5057
tokio-test.workspace = true

lib/vector-buffers/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ pub mod topology;
3232

3333
pub(crate) mod variants;
3434

35+
/// `disk_v2`'s write-buffer size, re-exported under `test` so the harness can
36+
/// size payloads against the real value instead of hardcoding it.
37+
#[cfg(feature = "test")]
38+
pub use variants::disk_v2::common::DEFAULT_WRITE_BUFFER_SIZE as WRITE_BUFFER_SIZE_V2;
39+
3540
use std::fmt::Debug;
3641

3742
#[cfg(test)]

0 commit comments

Comments
 (0)