Project

General

Profile

« Previous | Next » 

Revision 7120

band-aid for CN-CN replication permOrder issue when access control is embedded in EML and the system metadata is replicated before the EML. we just log the inconsistency and allow the insert to succeed
https://redmine.dataone.org/issues/2583

View differences:

src/edu/ucsb/nceas/metacat/replication/ReplicationService.java
582 582
		        if (accessControlList != null) {
583 583
		        	AccessControlForSingleFile acfsf = new AccessControlForSingleFile(docid);
584 584
		        	for (XMLAccessDAO xmlAccessDAO : accessControlList) {
585
		        		if (!acfsf.accessControlExists(xmlAccessDAO)) {
586
		        			acfsf.insertPermissions(xmlAccessDAO);
587
							logReplication.info("ReplicationService.handleForceReplicateRequest - document " + docid
588
									+ " permissions added to DB");
585
		        		try {
586
			        		if (!acfsf.accessControlExists(xmlAccessDAO)) {
587
			        			acfsf.insertPermissions(xmlAccessDAO);
588
								logReplication.info("ReplicationService.handleForceReplicateRequest - document " + docid
589
										+ " permissions added to DB");
590
			        		}
591
		        		} catch (PermOrderException poe) {
592
		        			// this is problematic, but should not prevent us from replicating
593
		        			// see https://redmine.dataone.org/issues/2583
594
		        			String msg = "Could not insert access control for: " + docid + " Message: " + poe.getMessage();
595
		        			logMetacat.error(msg, poe);
596
		        			logReplication.error(msg, poe);
589 597
		        		}
590 598
		            }
591 599
		        }

Also available in: Unified diff