Add live regression test for growing-file transfers, bump grace period to 1s
scripts/regression_test.sh exercises both writer behaviors -- normal append-only growth (the original, must-keep-working case) and preallocated growth (ftruncate-extend then shrink-and-rename, the case that caused the hang/corruption fixed in the previous commit) -- in both transfer directions, against a real ssh test host with a real capture file sliced to a record-aligned prefix. scripts/pcap_offsets.py computes record-boundary cut points for staging realistic growth. Bump FINALIZE_GRACE_PERIOD from 500ms to 1s: a comfortable margin even for a writer whose header and payload writes aren't atomic -- if the header landed, the body should follow shortly.
This commit is contained in:
+4
-2
@@ -18,8 +18,10 @@ const READ_WINDOW: usize = 1024 * 1024;
|
||||
/// visible via `fstat` slightly apart from each other -- NOT a guess about
|
||||
/// whether the writer finished; the authoritative "writer is done" signal
|
||||
/// is the rename itself (`complete_signal`). Re-checked continuously (reset
|
||||
/// on every observed length change), not a one-shot timer.
|
||||
const FINALIZE_GRACE_PERIOD: Duration = Duration::from_millis(500);
|
||||
/// on every observed length change), not a one-shot timer. 1s gives a
|
||||
/// comfortable margin even for a writer whose header and payload writes
|
||||
/// aren't atomic (if the header landed, the body should follow shortly).
|
||||
const FINALIZE_GRACE_PERIOD: Duration = Duration::from_secs(1);
|
||||
|
||||
pub enum SourceEvent {
|
||||
Chunk(ChunkKind, Vec<u8>),
|
||||
|
||||
Reference in New Issue
Block a user