Skip to content

Commit fbd0d46

Browse files
committed
distribution: dedupe SetHistoryDepthForTest doc comment (claude round-3 nit on PR #895)
The previous text had the 'tests in the kv package can drive eviction-trigger scenarios without adding a constructor option' line twice — once in the opening paragraph and once in the 'Production code must use...' paragraph. Harmless duplication; collapsed into a single sentence in the second paragraph. No code change.
1 parent 48bbcc4 commit fbd0d46

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

distribution/engine.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,13 @@ func (e *Engine) SnapshotAt(v uint64) (RouteHistorySnapshot, bool) {
214214
// avoid interleaving surprises around the eviction watermark, but
215215
// the write itself is lock-protected (e.mu.Lock below) so it is
216216
// safe to call from any goroutine that does not also expect a
217-
// consistent SnapshotAt view across the depth change. Exists so
218-
// tests in the kv package can drive eviction-trigger scenarios
219-
// without adding a constructor option just for tests (claude
220-
// review on PR #894).
217+
// consistent SnapshotAt view across the depth change.
221218
//
222-
// Production code must use DefaultRouteHistoryDepth (32) or a
223-
// future operator-exposed config knob; this seam is build-time
224-
// equivalent to direct field access and exists ONLY so tests in
225-
// the kv package can drive eviction-trigger scenarios without
226-
// adding a constructor option just for tests.
219+
// Exists so tests in the kv package can drive eviction-trigger
220+
// scenarios without adding a constructor option just for tests
221+
// (claude review on PR #894). Production code must use
222+
// DefaultRouteHistoryDepth (32) or a future operator-exposed
223+
// config knob.
227224
//
228225
// Fails fast on depth <= 0 (coderabbit minor on PR #895):
229226
// recordHistorySnapshotLocked's eviction path indexes

0 commit comments

Comments
 (0)