Depositor DB Additions
We want to control the distribution of Bags in Chronopolis on a bit finer of a level by controlling which nodes a Bag will replicate to based on the Depositor. In order to do this, we will want to make the Depositor a more concrete entity in the database, which will in turn have some cascading effects on the Bag model. The DB Entity is still being fleshed out, but should be complete shortly after some discussion with the group about what we want to capture.
Depositor Table
Field | Type |
---|---|
id | bigint |
source_organization | Text |
namespace | varchar(255) |
created_at | Timestamp |
updated_at | Timestamp |
Depositor Contact Table
field | type |
---|---|
id | bigint |
depositor_id | bigint |
contact_name | Text |
contact_phone | Text |
contact_email | Text |
Depositor/Node Join Table
Field | Type |
---|---|
depositor_id | bigint |
node_id | bigint |
Bag Entity Changes
Field | Old Type | New Type |
---|---|---|
depositor | String | bigint |
requiredReplcations | int | - |
Note that by removing the requiredReplications
field, we need to update the process for a Bag to move into the PRESERVED
state
Work
Migrations
-
Create depositor tables (depositor, contact, depositor/node join table) -
Indices for depositor tables (non-transactional, easier to have it be separate) -
Create default depositors from the current set of known namespaces -
Create default depositor distributions from the current set of replications -
Update bag table to include a depositor_id
column -
Insert depositor_ids into bag table -
Drop depositor column on bag table
Entity Updates
-
Depositor entity -
Bag updates -
Depositor -
deprecate requiredReplications
-
Rest Model Updates
-
Bag serializer needs to use Depositor entity to get the namespace, allows compatibility with previous versions of the model
Depositor serializer
Edited by Ghost User