XENON1T / pax

The XENON1T raw data processor [deprecated]
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

Don't delete runs while finishing final event writes #666

Open JelleAalbers opened 6 years ago

JelleAalbers commented 6 years ago

We currently delete runs which are marked 'processed' (https://github.com/XENON1T/pax/blob/master/bin/delete_decider#L140) and have ended (DAQ stopped) more than two hours ago.

However, marking a run as processed happens when the trigger is done (https://github.com/XENON1T/pax/blob/master/pax/plugins/io/MongoDB.py#L455), while event writing to file might not be finished. This is particularly likely if the trigger just blazed through a few runs when it's catching up with the DAQ after crash. If this is for a run that stopped more than two hours ago, the run might be deleted while final event writing is still in progress.

There is currently a one-minute delay between deciding a run should be deleted and actually starting deletion. We can increase this to e.g. five minutes as a temporary workaround, but of course a more robust solution would be either