After aa40222 the prober still idled: a dropped signature's range of the
ladder index is minutes of HDD (309 dropped, 242 with a poster tested on
the rows) and the sweep read the same ranges again every five minutes
inside the claim. Now each dropped class and signature is swept once
(swept_at, migration 7100; null again when the record drops it anew),
20 of each per sweep in rounds of 10k rows, in a loop of its own in the
prober beside the lanes and the namer (LOG.md (133)).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
27 lines
919 B
TypeScript
27 lines
919 B
TypeScript
import { BaseSchema } from '@adonisjs/lucid/schema'
|
|
|
|
/**
|
|
* The ladder's discard sweep (PendingLadder.discard) reads a dropped signature's or class's waiting rows once:
|
|
* `swept_at` marks it done (null again when the record drops it anew). Before, every sweep read every dropped
|
|
* signature's rows over again, minutes of HDD each, inside the claim (LOG.md (133)).
|
|
*/
|
|
export default class extends BaseSchema {
|
|
async up() {
|
|
this.schema.alterTable('pending_signatures', (table) => {
|
|
table.timestamp('swept_at', { useTz: true }).nullable()
|
|
})
|
|
this.schema.alterTable('pending_classes', (table) => {
|
|
table.timestamp('swept_at', { useTz: true }).nullable()
|
|
})
|
|
}
|
|
|
|
async down() {
|
|
this.schema.alterTable('pending_signatures', (table) => {
|
|
table.dropColumn('swept_at')
|
|
})
|
|
this.schema.alterTable('pending_classes', (table) => {
|
|
table.dropColumn('swept_at')
|
|
})
|
|
}
|
|
}
|