/** * Worker thread for the uniq scan (`--jobs N`) — fingerprints. * * Before a uniq run can write anything it has to find out which rows collided. * That means computing every row's tuple, and it splits because a tuple is a * function of its own row number: a worker takes a contiguous range, hashes * each tuple into a 13-byte fingerprint, and routes it straight into the file * of the pile the hash names. Nothing is sorted here — a pile is sorted by the * pile worker that picks it up, so that half of the work is spread too. * * The registry here is built WITHOUT applying the uniq group. That is not a * shortcut: the scan's input is what each row drew BEFORE any rearrangement, * so applying the rearrangement to obtain it would be circular. * * The same worker also answers the VERIFY step: given row numbers whose * fingerprints matched, it returns their true tuples, so the coordinator can * tell genuine repeats from hash collisions. Both jobs need the registry, * which is why they share a worker. */ export interface ScanWorkerInput { readonly source: string; readonly seed: string; readonly count: number; readonly locale?: string | undefined; readonly defaultLocale?: string | undefined; readonly now: number; readonly dataPaths?: readonly string[] | undefined; readonly baseDir?: string | undefined; /** The engine the caller FORCED; undefined routes by config (`mode: "disk"`). */ readonly engine?: 1 | 2 | 3 | undefined; /** The group's members, in the order the engine reads them. */ readonly members: readonly string[]; /** Scan job: hash rows `[start, end)` into pile files. */ readonly start?: number | undefined; readonly end?: number | undefined; /** Directory the pile files go in — the coordinator's, and its to remove. */ readonly dir?: string | undefined; /** Distinguishes this worker's files from the others' in that directory. */ readonly prefix?: string | undefined; /** How many piles — the same number every worker was given. */ readonly buckets?: number | undefined; /** * Verify job instead: return `[row, tuple]` for each of these rows. Sent for * the rows whose fingerprints matched — a handful, so one worker does it. */ readonly verifyIndices?: readonly number[] | undefined; } //# sourceMappingURL=scan-worker.d.ts.map