Skip to content

Concept of job ownership in PostgreSQL DB backend implementation

In the Objectstore implementation, anytime Maintenance, or DriveHandler processes start up (at tape daemon start up) they initialise the scheduler DB within which a new objectstore::AgentHeartbeatThread is spawned sending regular heartbeats to its object representation in the Objectstore. In case this heartbeat is lost, any other objects attached to this agent change ownership to another agent (e.g. maintenance agent) which then deals with the consequent actions (reporting, passing it to garbage collection agent etc.)

One possible representation of this concept using the Postgres DB backend could be a table registering all the "Agents" and their heartbeats and mapping them with their jobs in the queue tables (e.g. via mount_ID). In this way we could track more than just inactive processes, but also spot long holding jobs in the mount in a specific state etc.

Edited by Jaroslav Guenther