Task #1590
Feature #1577: use tables for storing System Metadata in Metacat
Task #1579: create additional tables
create replica policy table
100%
History
#1 Updated by Ben Leinfelder over 13 years ago
This is a bit trickier in that it has nested one-to-many. My first proposal flattens it into a single table where the attributes (replicationAllowed and numerReplicas) are duplicated when we have multiple preferred and/or blocked nodes:
CREATE TABLE systemMetadataReplicationPolicy (
guid text, -- the globally unique string identifier of the object that the system metadata describes
preferred_member_node VARCHAR(250), -- preferred replication member node
blocked_member_node VARCHAR(250), -- blocked replication member node
allowed boolean, -- replication allowed
numer_replicas INT8, -- the number of replicas allowed
CONSTRAINT systemMetadataReplicationPolicy_fk
FOREIGN KEY (guid) REFERENCES systemMetadata
);
#2 Updated by Ben Leinfelder over 13 years ago
A better approach:
1.) move these attributes to systemMetadata:
* ALTER TABLE systemMetadata ADD COLUMN replication_allowed boolean;
* ALTER TABLE systemMetadata ADD COLUMN number_replicas INT8;
2.) then make the policy table more flexible:
CREATE TABLE systemMetadataReplicationPolicy (
guid text, -- the globally unique string identifier of the object that the system metadata describes
member_node VARCHAR(250), -- replication member node
policy text, -- the policy (preferred, blocked, etc...TBD)
CONSTRAINT systemMetadataReplicationPolicy_fk
FOREIGN KEY (guid) REFERENCES systemMetadata
);
#3 Updated by Ben Leinfelder over 13 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 80
almost done testing this implementation locally
#4 Updated by Ben Leinfelder over 13 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100