After reset 24 the catalog grew ~3.7 GB an hour (77 GB, root 31 GB free, 600k history ranges to go). CATALOG_MAX_NVME_GB (as voyager 1's BACKFILL_MAX_NVME_GB): once the default tablespace is over it, leases and the prefetcher take priority < 0 only (the tail, the stored ranges); measured once a minute. Off when unset; 90 on homelab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
820 B
TypeScript
23 lines
820 B
TypeScript
import { test } from '@japa/runner'
|
|
import coordinatorConfig from '#config/coordinator'
|
|
|
|
test.group('CatalogSpace', () => {
|
|
test('is full over its cap, and off without one', async ({ assert }) => {
|
|
const before = coordinatorConfig.catalogMaxNvmeGb
|
|
try {
|
|
const { default: off } = await import('#services/catalog_space')
|
|
coordinatorConfig.catalogMaxNvmeGb = 0
|
|
assert.isFalse(await off.full())
|
|
// A fresh measurement with a cap far under any database's size.
|
|
;(off as any).checkedAt = 0
|
|
coordinatorConfig.catalogMaxNvmeGb = 0.000001
|
|
assert.isTrue(await off.full())
|
|
;(off as any).checkedAt = 0
|
|
coordinatorConfig.catalogMaxNvmeGb = 1_000_000
|
|
assert.isFalse(await off.full())
|
|
} finally {
|
|
coordinatorConfig.catalogMaxNvmeGb = before
|
|
}
|
|
})
|
|
})
|