par2 file lists dropped once their holders are final; late candidates claimable
Most par2 sets describe readable uploads whose files are never hashed, so they were never complete and kept forever (19 GB). Candidates added to a release after it settled were never marked ready (93,642 since 2026-10-13); the batch store and merge mark them now, migration 5100 repairs the waiting ones (LOG.md 2026-10-20 (87)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f41303482
commit
8ad5ea162c
7 files changed
+152
-61
No files matched your search
@@ -120,6 +120,18 @@ test.group('BatchStore', (group) => {
|
||||
assert.equal(Number(chunks!.n), 4)
|
||||
})
|
||||
|
||||
test('candidates added to a settled release (a later range of its upload) are claimable at once', async ({ assert }) => {
|
||||
await storeIn(GROUP, 1, upload(10, 'Some.Show.S01E02.1080p.mkv', 2, 'Some.Show.S01E02.1080p [1/2]', '2026-10-05T10:00:00Z'))
|
||||
// Settled before the next range came (the settler marks only what it settles).
|
||||
await db.from('releases').update({ settled_at: new Date() })
|
||||
await db.from('probe_candidates').update({ ready: true })
|
||||
await storeIn(GROUP, 100_001, upload(100_010, 'Some.Show.S01E02.1080p.par2', 1, 'Some.Show.S01E02.1080p [2/2]', '2026-10-05T10:20:00Z'))
|
||||
const candidates = await db.from('probe_candidates').orderBy('id').select('kind', 'ready')
|
||||
assert.deepEqual(candidates.map((c) => c.kind), ['par2'])
|
||||
assert.isTrue(candidates.every((c) => c.ready))
|
||||
assert.lengthOf(await releasesOf(), 1)
|
||||
})
|
||||
|
||||
test('the same upload in another group (multi-posted) is a release of its own', async ({ assert }) => {
|
||||
await storeIn(GROUP, 1, upload(10, 'Some.Show.S01E01.1080p.mkv', 2, 'Some.Show.S01E01.1080p [1/1]', '2026-10-05T10:00:00Z'))
|
||||
await storeIn('alt.binaries.other', 1, upload(10, 'Some.Show.S01E01.1080p.mkv', 2, 'Some.Show.S01E01.1080p [1/1]', '2026-10-05T10:01:00Z', 'alt.binaries.other'))
|
||||
|
||||
Reference in new issue
Block a user