Trigger
Do this once both #629 (windowed ingest, which defines mq.EmbeddedDuplicateWindow) and #635 (the DynamoDB boot wiring, which caps dedupe.lease) are on main. Until then neither branch contains the other's constant.
What
The embedded queue's 2-minute duplicate window is written down three times:
Once both PRs are on main, add a test that pins config.embeddedDuplicateWindow to mq.EmbeddedDuplicateWindow. It could live in a package that may import both, or in a small internal/config test that imports internal/mq in test code only. Then a change to the queue's window fails a test instead of silently loosening the lease cap. A version of this test exists on the integration/distributed branch as internal/config/window_test.go (#645).
Also at that point
Related: #613, #629, #633, #635.
Trigger
Do this once both #629 (windowed ingest, which defines
mq.EmbeddedDuplicateWindow) and #635 (the DynamoDB boot wiring, which capsdedupe.lease) are on main. Until then neither branch contains the other's constant.What
The embedded queue's 2-minute duplicate window is written down three times:
mq.EmbeddedDuplicateWindow(fix(ingest): windowed reserve/publish/commit; 503 when dedupe down #629): the ingest stream'sDuplicatessetting.settings.MinDedupeRetention(feat(dedupe): retention per tenant and table, and an expiry sweep #633): the shortest finitededupe.retention. A test ininternal/apipins it to be at leastmq.EmbeddedDuplicateWindow.config.embeddedDuplicateWindow(feat(app): choose the DynamoDB dedupe backend at boot #635): the window thededupe.leasecap is checked against.internal/configmust not importinternal/mq, because that would pull NATS into everything that imports config. Nothing pins it to the mq constant.Once both PRs are on main, add a test that pins
config.embeddedDuplicateWindowtomq.EmbeddedDuplicateWindow. It could live in a package that may import both, or in a smallinternal/configtest that importsinternal/mqin test code only. Then a change to the queue's window fails a test instead of silently loosening the lease cap. A version of this test exists on theintegration/distributedbranch asinternal/config/window_test.go(#645).Also at that point
configuration.mdxandconfig.yamlsaydedupe.reserve_concurrencyhas no effect on the fan-out while ingest sends one id per call. Once fix(ingest): windowed reserve/publish/commit; 503 when dedupe down #629's windows are in, oneReservecarries up to 256 ids, so that wording must change.lease + ceil(lease) + 1s ≤ 2m) against fix(ingest): windowed reserve/publish/commit; 503 when dedupe down #629's2×lease + 1sstatement of the same invariant, and make the two agree.Related: #613, #629, #633, #635.