Seed leases respect the backfill's disk limits
No new range while the database's NVMe part or the hdd tablespace is over BACKFILL_MAX_NVME_GB / BACKFILL_MAX_HDD_GB; nodes ask again a minute later. seed:status says when leasing is paused. The NVMe part was at 47 GB of 50 with a plan for all of a.b.ath queued. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f9e9295d3e
commit
00f6187b8f
4 files changed
+33
-3
No files matched your search
@@ -90,7 +90,15 @@ class BackfillService {
|
||||
}
|
||||
|
||||
/** True when both parts of the database are under their limits, else why not. */
|
||||
private async room(maxDefaultGb: number, maxHddGb: number): Promise<true | string> {
|
||||
/**
|
||||
* Whether the database has room for more history: the default tablespace
|
||||
* (NVMe) and tablespace `hdd` against BACKFILL_MAX_NVME_GB/_HDD_GB. Seed
|
||||
* leases (CONCEPT.md D38) check the same limits.
|
||||
*/
|
||||
async room(
|
||||
maxDefaultGb = indexerConfig.backfill.maxDefaultGb,
|
||||
maxHddGb = indexerConfig.backfill.maxHddGb
|
||||
): Promise<true | string> {
|
||||
const { rows } = await db.rawQuery(
|
||||
`SELECT spcname, pg_tablespace_size(oid) AS bytes FROM pg_tablespace WHERE spcname IN ('pg_default', 'hdd')`
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user