Revision 7074
Added by Chris Jones almost 13 years ago
src/edu/ucsb/nceas/metacat/dataone/CNodeService.java | ||
---|---|---|
500 | 500 |
NodeReference nodeReference = node.getIdentifier(); |
501 | 501 |
logMetacat.debug("In setReplicationStatus(), Node reference is: " + nodeReference.getValue()); |
502 | 502 |
|
503 |
// allow target MN certs and CN certs
|
|
504 |
if (targetNode.getValue().equals(nodeReference.getValue()) ||
|
|
503 |
// allow target MN certs |
|
504 |
if (targetNode.getValue().equals(nodeReference.getValue()) &&
|
|
505 | 505 |
node.getType() == NodeType.MN) { |
506 | 506 |
List<Subject> nodeSubjects = node.getSubjectList(); |
507 | 507 |
|
... | ... | |
509 | 509 |
for (Subject nodeSubject : nodeSubjects) { |
510 | 510 |
logMetacat.debug("In setReplicationStatus(), comparing subjects: " + |
511 | 511 |
nodeSubject.getValue() + " and " + subject.getValue()); |
512 |
if ( nodeSubject.equals(subject) ) { |
|
513 |
allowed = true; // subject of session == target node subject |
|
514 |
break; |
|
512 |
if ( nodeSubject.equals(subject) ) { // subject of session == target node subject |
|
515 | 513 |
|
514 |
// lastly limit to COMPLETED status updates from MNs only |
|
515 |
if ( status == ReplicationStatus.COMPLETED ) { |
|
516 |
allowed = true; |
|
517 |
break; |
|
518 |
|
|
519 |
} |
|
516 | 520 |
} |
517 | 521 |
} |
518 | 522 |
} |
Also available in: Unified diff
Modify CNodeService.setReplicationStatus() slightly to restrict MN-based calls to only set the status to COMPLETED. The CNs should be setting failures or invalidations, or the status can remain at QUEUED or REQUESTED, and the MNAuditTask can revisit those replicas as needed.