Repository navigation
Release v1.28.0
Job rehydration no longer loads finalized stopped jobs from storage, so a silo with a long history of stopped jobs starts faster and uses less memory.
Added
IJobStorage.GetJobsExcludingFinalizedStopsreturns jobs for the given statuses while leaving out stopped jobs whose stop has completed. It has a default implementation that filters the result ofGetJobs, so custom storage providers keep working without changes and can override it to filter in storage. (#125)
Changed
- The jobs manager now reads rehydration candidates through
GetJobsExcludingFinalizedStops. The in-memory provider filters before building its result; the MongoDB provider filters in the query and adds astatus_stopFinalizedindex to the jobs collection; the SQL provider filters in the query on SQLite. PostgreSQL, MySQL/MariaDB and SQL Server keep filtering after the read. With 10,000 finalized stopped jobs and 100 live jobs, rehydration reads went from about 112 ms to 7.6 ms on SQLite and from about 219 µs to 72 µs in memory. No schema migration is needed, and rolling upgrades are supported. (#125)