Skip to content

Commit

Permalink
worker_db: Only warn on repeated archive read if dataset changed
Browse files Browse the repository at this point in the history
In larger experiments, it is quite natural for the same dataset
to be read from multiple unrelated components. The only situation
where multiple reads from an archived dataset are problematic is
when the valeu actually changes between reads. Hence, this commit
restricts the warning to the latter situation.
  • Loading branch information
dnadlinger authored and sbourdeauducq committed Jul 12, 2018
1 parent 4843832 commit 141fcaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions artiq/master/worker_db.py
Expand Up @@ -227,9 +227,9 @@ def get(self, key, archive=False):
else:
data = self.ddb.get(key)
if archive:
if key in self.archive:
logger.warning("Dataset '%s' is already in archive, "
"overwriting", key, stack_info=True)
if self.archive.get(key, data) != data:
logger.warning("Older value of dataset '%s' is already in "
"archive, overwriting", key, stack_info=True)
self.archive[key] = data
return data

Expand Down

0 comments on commit 141fcaa

Please sign in to comment.