mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
b0ccd2753b97cf08484ea0ad5f8d70c9e0195a75
Sign-prep for T2B-NVMe-product-ready promotion (QA §4 checklist
items #1-3). Three new test files validating the V2-strict session
concurrency model under sustained load + a YAML-scripted subprocess
smoke for scenario reviewability.
## L1-A: ConcurrentQueueStress (t2_a_concurrent_queue_stress_test.go)
8 IO queues × 50 sequential Writes per queue = 400 Writes total.
Each Write is 32 KiB split into 8 × 4 KiB H2CData chunks (kernel
mkfs pattern). 90s hard deadline guards against deadlock
regressions.
Invariants:
- backend.calls == 400
- backend.bytes == 400 × 32 KiB
- no per-queue transport / status errors
- concurrent queues share target.ctrlMu without interference
Added helper: stressWriteTarget(t, volumeSize uint64) — spins up a
target with configurable volume size (default 1 MiB is too small
for 400 non-overlapping 32 KiB writes; test uses 64 MiB).
Runtime: 60 ms (localhost loopback).
## L1-A: LargeWriteStress (t2_a_large_write_stress_test.go)
100 sequential Writes at each of 5 sizes (512 B, 4 KiB, 8 KiB,
16 KiB, 32 KiB MDTS boundary). Per-iteration asserts:
- Exactly one R2T per cmd with DATAL == totalBytes (pins the
single-R2T-per-cmd invariant from the V2-strict revert)
- backend.calls / backend.bytes accumulate correctly
- Success status on every iteration
Added helper: writeChunkedOnClient(t, cli, slba, nlb, payload,
chunks) — issues a Write with N H2CData chunks (existing
nvmeClient.writeCmd does single-chunk only).
Runtime: 100 ms total across all 5 shapes.
## L2-A: Scripted smoke (testdata/t2-nvme-smoke.yaml +
## t2_l2_nvme_smoke_replay_test.go)
Declarative YAML scenario replayed against real blockmaster +
blockvolume subprocesses (reuses existing startL2NvmeHarness).
8 steps covering mixed sizes (1 LBA, 8 LBAs, 64 LBAs) + overwrite
semantics (write seed=11 at LBA 0, then write seed=44 at LBA 0,
assert read returns seed=44).
Payload semantics:
byte[i] = (seed + i) & 0xFF (deterministic; reads verify bit-
for-bit)
Adds yaml.v3 as test-only dep (already in go.mod via other
packages). Runtime: 13.7 s (subprocess bringup dominates).
## Files added
core/frontend/nvme/t2_a_concurrent_queue_stress_test.go (~130 LOC)
core/frontend/nvme/t2_a_large_write_stress_test.go (~160 LOC)
core/frontend/nvme/t2_l2_nvme_smoke_replay_test.go (~130 LOC)
core/frontend/nvme/testdata/t2-nvme-smoke.yaml (~60 LOC)
## Regression
go test ./core/frontend/nvme/ -count=1 → ok 60.9s
(full suite including existing L2 subprocess tests + new stress)
go test ./core/frontend/nvme/ -short -count=1 → ok 1.5s
(short mode skips L2 + stress; unit-only)
## Sign-prep checklist progress (QA §4)
#1 L1-A ConcurrentQueueStress [x] this commit
#2 L1-A LargeWriteStress [x] this commit
#3 L2-A t2-nvme-smoke.yaml + replay [x] this commit
#4 L3-A m01 iterate-m01-nvme.sh [ ] QA-owned
#5 Full regression green [x]
#6 Boundary guard green [x]
#7-#11 QA, post-checklist
Not in this commit (QA-authored files that landed in the same
working tree): t2_v2port_nvme_disconnect_mid_r2t_test.go,
t2_v2port_nvme_reconnect_loop_test.go, pipeline_extended +
pipelined_writes rewrites, scripts/iterate-m01-nvme.sh — QA to
commit separately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%