From 444c026ad6ad4c8c0e5ec765c6c18663246f5170 Mon Sep 17 00:00:00 2001 From: zaihuaji Date: Thu, 1 Oct 2026 09:24:31 -0500 Subject: [PATCH] do not skip locked datasets when gathering changed files; bump version to 3.0.17 A changed-file run (-c N) works on records that are already backed up (bid > 0) while the main runs take new files (bid = 0), so the two share no record and the changed-file gather does not need to wait for another worker's dataset lock. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 2 +- src/rda_python_dsquasar/dsquasar.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7718cf7..2d8f1f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rda_python_dsquasar" -version = "3.0.16" +version = "3.0.17" authors = [ { name="Zaihua Ji", email="zji@ucar.edu" }, ] diff --git a/src/rda_python_dsquasar/dsquasar.py b/src/rda_python_dsquasar/dsquasar.py index c09000d..24ca8af 100644 --- a/src/rda_python_dsquasar/dsquasar.py +++ b/src/rda_python_dsquasar/dsquasar.py @@ -1408,7 +1408,11 @@ def gather_dataset_files(self, dsfiles, unlock = True, sizes = None): # them before any work, and -A 3 does a third one before tarring self.check_batch_deadline() dsid = pgrec['dsid'] - if unlock and pgrec['pid'] and self.lock_dataset(dsid, 0, self.LOGACT) < 1: continue + # a changed-file run takes records that are already backed up (bid > 0) while the + # main runs take new files (bid = 0), so it shares no record with the worker holding + # the lock and must not skip the dataset for it + if unlock and pgrec['pid'] and not self.PGBACK['chgdays']: + if self.lock_dataset(dsid, 0, self.LOGACT) < 1: continue fcnt += self.get_dataset_files(dsid, dsfiles, pgrec['backflag'], logact, sizes) if dsfiles: s = 's' if fcnt > 1 else ''