Skip to content

Fix the missing PBS progress report, the progress line and stalled-worker detection - #46

Merged
zaihuaji merged 1 commit into
mainfrom
hua-work-dsquasar
Sep 28, 2026
Merged

zaihuaji merged 1 commit into
mainfrom
hua-work-dsquasar

Conversation

@zaihuaji

Copy link
Copy Markdown
Collaborator

Summary

  • Missing progress report. check_batch_deadline() was only reached from process_one_backup_file() and transfer_quasar_tarfiles(), i.e. only where a tar was actually dispatched. Every continue above the dispatch skipped it, so a long stretch of skipped files walked past the walltime cutoff without ever parking a report. It is now called from the top of all four per-item loops.
  • Misleading progress line. The report led with the tar queue depths, but -A 3 tars each input file right after creating it, so the N count stays near zero exactly while building is the busy phase. New batch_done_count() reports dcount/fcount instead.
  • Stalled-worker test. worker_progress_stalled() used an absolute done fraction (MINWDONE = 0.01), so a job at 2% read as progressing and never got a second worker even though it projected to ~28 days. Now rate based: MINWPROJ = 0.9, stalled when done*WALLTIME/elapsed < MINWPROJ.

Test plan

  • python3 -m py_compile clean
  • 500 all-skipped files and 500 sub-threshold files each hit the walltime guard 500 times (was 0)
  • one report per run, none at 0 files, child never reports, guard parks at most once
  • batch_done_count() reproduces the live dscheck gc numbers (130927<:>2604 -> 2604 of 130927 file(s) done(1%))
  • stall test: production case flips to stalled; grace period, dead process and unlocked-job guards all preserved
  • watch the next -A 3 batch run send a progress report with the new line

Generated with Claude Code

dcount/fcount; judge a stalled worker on its rate; bump version to 3.0.14

The walltime guard was only reached where a tar was actually dispatched, so
a long stretch of skipped files walked past the cutoff without parking a
progress report - a 23h run reported nothing. The tar queue depths also read
as almost done while building was the busy phase, and a job at 2% cleared the
absolute 1% stall threshold and so never got a second worker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zaihuaji
zaihuaji merged commit ce3244f into main Sep 28, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant