usnistgov / oar-pdr

The NIST Open Access to Research (OAR) Public Data Repository (PDR) system software
11 stars 10 forks source link

Preservation Service Bug fix: don't lose filesizes while publishing update #57

Closed RayPlante closed 6 years ago

RayPlante commented 6 years ago

As noted as part of #54 (see comment), the preservation service was losing file sizes during a publishing update for files that were not being updated. Processing the updated POD file during an update was blowing away the size values (and other metadata extracted from the files, like the checksum). To fix this, the file-extracted metadata were written out as annotations to the metadata (which are protected from updates to the POD). As part of this, the code needed to be cleaned up where assumptions were made that annotations would not have such metadata.

RayPlante commented 6 years ago

tested locally under oar-docker; will deploy on testdata.