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 ''