Files
rustfs/scripts/ci/receipt-fixture-tmpdir.sh
T
Hauser e0444b519d feat(ecstore): add sampled batch CPU diagnostics (#9019)
* feat(ecstore): add sampled batch CPU diagnostics

Keep timing and request correlation in a separate default-off feature. Preserve the existing positioned-read backend, byte and error contracts.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* fix(ecstore): route batch diagnostics through storage facade

Keep the diagnostic implementation private to its owner and expose explicit feature-gated helpers through the existing storage boundary.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* fix(ecstore): retain diagnostic IDs across GET producer tasks

Capture request context before spawning the legacy producer. Keep the existing producer, cancellation and read-lock lifetime intact.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* fix(ecstore): avoid unused batch read index

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* fix(obs): isolate local batch diagnostic JSON events

Omit span metadata and inferred parent IDs for diagnostic root events. Verify per-shard index order and document existing production metric timing.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* test(ecstore): accelerate receipt fixture in CI

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* test(heal): allocate stack for bucket recovery fixture

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

* test(s3): allocate stack for conditional GET fixture

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>

---------

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
2026-10-29 10:32:06 +08:00

26 lines
993 B
Bash

#!/bin/sh
# This fixture checks missing and corrupt receipts, not crash durability.
# Keep the real ECStore and its full-tail writes, but avoid overlay fsync cost
# when this Linux runner has enough tmpfs space for all 1,001 pairs.
set -eu
if [ "$(uname -s)" != Linux ] || [ ! -d /dev/shm ] || [ ! -w /dev/shm ]; then
echo 'Receipt fixture: using the default temporary directory'
exit 0
fi
fs_type=$(stat -f -c %T /dev/shm 2>/dev/null || true)
free_kib=$(df -Pk /dev/shm 2>/dev/null | awk 'NR == 2 { print $4 }' || true)
case "$free_kib" in
''|*[!0-9]*) free_kib=0 ;;
esac
# A 64 MiB tmpfs peaked at about 32 MiB in the full fixture. Leave at least
# 16 MiB of headroom and fall back when the mount is too small or unavailable.
if [ "$fs_type" = tmpfs ] && [ "$free_kib" -ge 49152 ]; then
printf 'TMPDIR=/dev/shm\n' >> "$NEXTEST_ENV"
echo "Receipt fixture: using tmpfs with ${free_kib} KiB free"
else
echo 'Receipt fixture: using the default temporary directory'
fi