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 trace the backup scheduler and existing tests, then update selection semantics around
IsExecutingand run the focused test suite. - Assistant
The scheduler currently treats pending, started, and running as one “in progress” class and sorts by name, which explains the preemption. I’m locating its test coverage now;
rgisn’t installed here, so I’m using the repository’s available search tools. - Assistant
The intended distinction is clear:
pendingremains “in progress” for status reporting, but it is not “executing” for resource ownership. I’m adding that separate predicate and changing scheduling order to creation time ascending with name as the equal-time tie-break. - Assistant
The regression cases are now covered: an older pending backup cannot displace a started backup, and pending backups choose oldest creation time then lexical name. The focused package tests are compiling and running.
- Assistant
The first test attempt hit the container’s process limit during compilation, not a code failure. I’ve rerun it with constrained Go parallelism; compilation is still progressing cleanly.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.