Skip to content

Next #8

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from
Draft

Next #8

wants to merge 24 commits into from

Conversation

donald
Copy link
Contributor

@donald donald commented Apr 7, 2025

No description provided.

@donald donald marked this pull request as draft April 7, 2025 08:21
donald added 23 commits April 7, 2025 10:27
We now have seperate FULL and INCREMENTAL backup jobs. Also we have the
new REFRESH ('%') backup job. The 4/5 hours time limit was to low
anyway, so implement new time limits:

INCREMENTAL : 10 hours
EXPIRE job  : 10 hours
FULL        : 3 days
BALANCE     : 3 days
REFRESH     : 3 days
Only dedup with jobid with same id, not with jobs with different jobid
but same name or same distmaster family.

While there is a win in used space for the extra deduplications, there
is also a reason to keep the additional redundancy, because data can be
corrupted when a project is moved or during dist.

Additionally, the multiple database queries significantly slow down the
"search for the next job to do" loop. This is more relevant for the
search for FULL backups, becase ypically there are no FULL backups to be
done during normal operation and the process has to walk over all jobs.
Add code to override the sqlite database name via environment variable.
This can help in development, so that code can be tested against a copy
of a real database as an unpriviledged user while avoiding the risk to
block the running server or corrupte the backup data.
FULL backups want only jobs without existing stat records. Usually,
there will be none. Select jobs without stat records by `LEFT JOIN
stat ON stat_job_id = job_id WHERE stat_job_id IS NULL`.

This reduced the time for test runs to discover that there are no FULL
jobs to do in an actual database from 2.02 seconds to 0.06 seconds.
Space after comma, spaces around other operators, remove some comments
When we move a run from one volume to another and dedup on the target
volume, use the smaller (older) generation number of the two source runs
which are joined, because both can contribute data.

Remove "review" fuse for cmd_move.
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
1 participant