Prober: the signature index by the poster's md5
A poster of 2.7 kB broke the index build (a btree key is at most a third of a page) and left an invalid index that IF NOT EXISTS would have taken for the real one: the migration drops it first and indexes md5(poster), and the sweep asks by it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
8e008da364
commit
411c36eec0
2 files changed
+10
-6
No files matched your search
@@ -438,8 +438,9 @@ class PendingLadder {
|
||||
for (const s of signatures) {
|
||||
let rows: any[]
|
||||
do {
|
||||
// The poster's rows by the signature index, a tool's and group's by the ladder's: never a test on the rows,
|
||||
// which was a scan of the whole table per signature on the HDD (LOG.md (134)).
|
||||
// The poster's rows by the signature index (on the poster's md5: a poster can be longer than a btree
|
||||
// key), a tool's and group's by the ladder's: never a test on the rows, which was a scan of the whole
|
||||
// table per signature on the HDD (LOG.md (134)).
|
||||
;({ rows } =
|
||||
s.poster === ''
|
||||
? await db.rawQuery(
|
||||
@@ -449,8 +450,8 @@ class PendingLadder {
|
||||
)
|
||||
: await db.rawQuery(
|
||||
`SELECT encode(release_key, 'hex') AS release_key FROM pending_releases
|
||||
WHERE status = ? AND group_id = ? AND tool = ? AND poster = ? LIMIT ?`,
|
||||
[PENDING.waiting, s.group_id, s.tool, s.poster, limit]
|
||||
WHERE status = ? AND group_id = ? AND tool = ? AND md5(poster) = md5(?::text) AND poster = ? LIMIT ?`,
|
||||
[PENDING.waiting, s.group_id, s.tool, s.poster, s.poster, limit]
|
||||
))
|
||||
discarded += await this.discardKeys(rows, samplePercent)
|
||||
} while (rows.length === limit && rows.some((r) => !explored(r.release_key, samplePercent)))
|
||||
|
||||
Reference in new issue
Block a user