Skip to content

Commit f2cea4a

Browse files
Merge branch 'master' into zerobus-defer-descriptor
2 parents bdd9e09 + 2084d53 commit f2cea4a

5 files changed

Lines changed: 34 additions & 16 deletions

File tree

.github/workflows/publish.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ jobs:
273273

274274
deb-verify:
275275
name: Verify DEB Packages
276-
runs-on: ubuntu-24.04
276+
runs-on: ${{ matrix.runner }}
277277
timeout-minutes: 5
278278
needs:
279279
- generate-publish-metadata
@@ -284,6 +284,9 @@ jobs:
284284
DD_PKG_VERSION: "latest"
285285
strategy:
286286
matrix:
287+
runner:
288+
- ubuntu-24.04
289+
- ubuntu-24.04-arm
287290
container:
288291
- ubuntu:20.04
289292
- ubuntu:22.04
@@ -304,25 +307,29 @@ jobs:
304307
make
305308
- name: Install dd-pkg for linting
306309
run: |
307-
curl -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_x86_64.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
310+
ARCH=$(uname -m)
311+
case "$ARCH" in aarch64) ARCH_DL=arm64 ;; *) ARCH_DL="$ARCH" ;; esac
312+
curl -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_${ARCH_DL}.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
308313
- name: Fix Git safe directories issue when in containers (actions/checkout#760)
309314
run: git config --global --add safe.directory /__w/vector/vector
310315
- name: Checkout Vector
311316
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
312317
with:
313318
ref: ${{ inputs.git_ref }}
314-
- name: Download staged package artifacts (x86_64-unknown-linux-gnu)
319+
- name: Set artifact name
320+
run: echo "ARTIFACT=$(uname -m)-unknown-linux-gnu" >> "$GITHUB_ENV"
321+
- name: Download staged package artifacts
315322
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
316323
with:
317-
name: vector-${{ env.VECTOR_VERSION }}-x86_64-unknown-linux-gnu
324+
name: vector-${{ env.VECTOR_VERSION }}-${{ env.ARTIFACT }}
318325
path: target/artifacts
319326
- name: Verify install of DEB package.
320327
run: |
321-
./scripts/verify-install.sh target/artifacts/vector_${{ env.VECTOR_VERSION }}-1_amd64.deb
328+
./scripts/verify-install.sh "target/artifacts/vector_${{ env.VECTOR_VERSION }}-1_$(dpkg --print-architecture).deb"
322329
323330
rpm-verify:
324331
name: Verify RPM Packages
325-
runs-on: ubuntu-24.04
332+
runs-on: ${{ matrix.runner }}
326333
timeout-minutes: 10
327334
needs:
328335
- generate-publish-metadata
@@ -333,6 +340,9 @@ jobs:
333340
DD_PKG_VERSION: "latest"
334341
strategy:
335342
matrix:
343+
runner:
344+
- ubuntu-24.04
345+
- ubuntu-24.04-arm
336346
container:
337347
# Lowest supported glibc tier (EL8 family, glibc 2.28). Catches glibc-floor regressions.
338348
- "almalinux:8@sha256:ca871b110064fe81bff0250ed5cc56fbb0a9840715f09811c33bbf9d72cef56c"
@@ -358,21 +368,25 @@ jobs:
358368
fi
359369
- name: Install dd-pkg for linting
360370
run: |
361-
curl -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_x86_64.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
371+
ARCH=$(uname -m)
372+
case "$ARCH" in aarch64) ARCH_DL=arm64 ;; *) ARCH_DL="$ARCH" ;; esac
373+
curl -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_${ARCH_DL}.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
362374
- name: Fix Git safe directories issue when in containers (actions/checkout#760)
363375
run: git config --global --add safe.directory /__w/vector/vector
364376
- name: Checkout Vector
365377
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
366378
with:
367379
ref: ${{ inputs.git_ref }}
368-
- name: Download staged package artifacts (x86_64-unknown-linux-gnu)
380+
- name: Set artifact name
381+
run: echo "ARTIFACT=$(uname -m)-unknown-linux-gnu" >> "$GITHUB_ENV"
382+
- name: Download staged package artifacts
369383
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
370384
with:
371-
name: vector-${{ env.VECTOR_VERSION }}-x86_64-unknown-linux-gnu
385+
name: vector-${{ env.VECTOR_VERSION }}-${{ env.ARTIFACT }}
372386
path: target/artifacts
373387
- name: Verify install of RPM package.
374388
run: |
375-
./scripts/verify-install.sh target/artifacts/vector-${{ env.VECTOR_VERSION }}-1.x86_64.rpm
389+
./scripts/verify-install.sh "target/artifacts/vector-${{ env.VECTOR_VERSION }}-1.$(uname -m).rpm"
376390
377391
macos-verify:
378392
name: Verify macOS Package

.github/workflows/semantic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ jobs:
127127
aws service
128128
azure service
129129
confluent service
130+
databricks_zerobus sink
130131
datadog service
131132
elastic service
132133
gcp service
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Reduce the memory usage of the `tag_cardinality_limit` transform when running in `exact` mode by allocating less unused memory on initialization.
2+
3+
authors: ArunPiduguDD

src/transforms/tag_cardinality_limit/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ impl TagCardinalityLimit {
213213
let metric_accepted_tags = self.accepted_tags.entry(metric_key_owned).or_default();
214214
let tag_value_set = metric_accepted_tags
215215
.entry_ref(key)
216-
.or_insert_with(|| AcceptedTagValueSet::new(config.value_limit, &config.mode));
216+
.or_insert_with(|| AcceptedTagValueSet::new(&config.mode));
217217

218218
if tag_value_set.contains(value) {
219219
// Tag value has already been accepted, nothing more to do.
@@ -300,7 +300,7 @@ impl TagCardinalityLimit {
300300
let metric_accepted_tags = self.accepted_tags.entry(metric_key_owned).or_default();
301301
metric_accepted_tags
302302
.entry_ref(key)
303-
.or_insert_with(|| AcceptedTagValueSet::new(config.value_limit, &config.mode))
303+
.or_insert_with(|| AcceptedTagValueSet::new(&config.mode))
304304
.insert(value.clone());
305305
false
306306
}

src/transforms/tag_cardinality_limit/tag_value_set.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ impl fmt::Debug for TagValueSetStorage {
5959
}
6060

6161
impl AcceptedTagValueSet {
62-
pub fn new(value_limit: usize, mode: &Mode) -> Self {
62+
pub fn new(mode: &Mode) -> Self {
6363
let storage = match &mode {
64-
Mode::Exact => TagValueSetStorage::Set(HashSet::with_capacity(value_limit)),
64+
Mode::Exact => TagValueSetStorage::Set(HashSet::new()),
6565
Mode::Probabilistic(config) => {
6666
TagValueSetStorage::Bloom(BloomFilterStorage::new(config.cache_size_per_key))
6767
}
@@ -100,7 +100,7 @@ mod tests {
100100

101101
#[test]
102102
fn test_accepted_tag_value_set_exact() {
103-
let mut accepted_tag_value_set = AcceptedTagValueSet::new(2, &Mode::Exact);
103+
let mut accepted_tag_value_set = AcceptedTagValueSet::new(&Mode::Exact);
104104

105105
assert!(!accepted_tag_value_set.contains(&TagValueSet::from(["value1".to_string()])));
106106
assert_eq!(accepted_tag_value_set.len(), 0);
@@ -116,7 +116,7 @@ mod tests {
116116

117117
#[test]
118118
fn test_accepted_tag_value_set_probabilistic() {
119-
let mut accepted_tag_value_set = AcceptedTagValueSet::new(2, &Mode::Exact);
119+
let mut accepted_tag_value_set = AcceptedTagValueSet::new(&Mode::Exact);
120120

121121
assert!(!accepted_tag_value_set.contains(&TagValueSet::from(["value1".to_string()])));
122122
assert_eq!(accepted_tag_value_set.len(), 0);

0 commit comments

Comments
 (0)