Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

On new, moved and renamed, and modied bags. indexer script should compare the bag's checksum with one in index #9

Open
mjordan opened this issue Nov 22, 2017 · 1 comment
Assignees

Comments

@mjordan
Copy link
Owner

mjordan commented Nov 22, 2017

The watcher script should use the bag's checksum to confirm that it is dealing with the same bag file in its on_moved() method.

@mjordan
Copy link
Owner Author

mjordan commented Nov 23, 2017

The checksum should be compared for new bags as well. Logic is:

  • If a bag with the new bag's checksum doesn't exist, add the bag.
  • If a bag with the new bag's checksum exists, update its bag_location_exact and bag_location fields, and its document_timestamp.

For moved or renamed bags, the logic is:

  • If a bag with the moved or renamed bag's checksum exists, update its bag_location_exact and bag_location fields, and its document_timestamp. Do not update its ID.
  • If a bag with the bag's checksum does not exist, add it as new.

For modified bags (bags that overwrite existing bags), the logic is:

  • If a bag with the modified bag's checksum exists, update its bag_location_exact and bag_location fields (if necessary), its bag_hash value, and its document_timestamp. Do not update its ID.
  • If a bag with the bag's checksum does not exist, add it as new.

@mjordan mjordan changed the title On move and rename, watcher script should compare the bag's checksum with one in index On new, moved and renamed, and modied bags. indexer script should compare the bag's checksum with one in index Nov 23, 2017
mjordan added a commit that referenced this issue Nov 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant