Files
usenet-indexer/database/migrations/1770000001500_ranges_plain_chunks.ts
T
Daan MeijerandClaude Opus 5.5 cfe85abc3e
Test and deploy / test (push) Successful in 23s
Test and deploy / deploy (push) Skipped
Rebuild: chunks the server's compression cuts short are fetched plain
Eweka sends some ranges' compressed XOVER truncated, the same bytes
every time, while the plain reply is whole (a.b.models 3317215-3367214:
1,675,600 bytes that don't inflate, twice; 50,000 lines plain;
tools/false_end.ts). Not a false end of reply. The worker's corrupt
report removed the chunk and the range was fetched again, with the same
bytes: one range was reported 540 times. (Before this morning's change
the inflate check waited for more data until the 10-minute timeout,
like voyager 1's 'chunk never answered' ranges.)

A reported chunk's start goes into ranges.plain_chunks; the prefetcher
fetches those over one connection without XFEATURE COMPRESS GZIP
(NntpPool.usePlain, opened on demand) and deflates them here. A plain
chunk reported again sets the range aside (status failed, error). The
capture (edge:bench --capture) fetches such a chunk plain too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:51:25 +02:00

19 lines
726 B
TypeScript

import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* Chunks of a range to fetch without compression: Eweka sends some ranges'
* compressed XOVER truncated, the same bytes every time, while the plain
* reply is whole (LOG.md 2026-10-09 (11)). A worker reports such a chunk;
* its start goes here and the prefetcher fetches it plain.
*/
export default class extends BaseSchema {
async up() {
this.schema.raw(`ALTER TABLE ranges ADD COLUMN IF NOT EXISTS plain_chunks bigint[] NOT NULL DEFAULT '{}'`)
this.schema.raw(`ALTER TABLE ranges ADD COLUMN IF NOT EXISTS error text`)
}
async down() {
this.schema.raw(`ALTER TABLE ranges DROP COLUMN IF EXISTS plain_chunks, DROP COLUMN IF EXISTS error`)
}
}