Pending backups can preempt a backup that is already executing Backup scheduling must…
- User
Pending backups can preempt a backup that is already executing
Backup scheduling must not select a pending backup while another backup is already executing. When none is executing, select the oldest pending backup, using a deterministic tie-break for equal creation times.
Interface
Type: Function Name: IsExecuting Path: api/v1/backup_funcs.go Input: () Output: bool Description: Returns true if the backup has started or is running. Use this to determine whether a backup holds active resources and should not be preempted.
- Assistant
I’ll inspect the backup scheduling path and existing tests, then update the selection logic and add regression coverage for executing backups and deterministic oldest-first selection.
- Assistant
The current scheduler treats pending, started, and running as the same “in progress” class and sorts by name, which explains the preemption. I’m narrowing the expected phase semantics and test conventions before changing it.
- Assistant
I’ve confirmed the regression mechanism: an explicitly pending backup is encountered before a running one and is allowed to win by name. The fix will separate resource-holding phases (
started/running) from queued work, scan execution first, and only then choose by creation time with name as the tie-breaker. - Assistant
The implementation and regression tests are in place. The focused package test is still building its local Go dependency cache; once it completes I’ll run the affected controller tests as a cross-check.
- Assistant
The first test attempt hit the container’s process limit during compilation, not a code failure. I’ve rerun it with serialized package building; it’s progressing without errors so far.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.