Project

General

Profile

« Previous | Next » 

Revision 7202

make only one DB call to look up local pids - no need to do a pstmt for every single shared pid.

View differences:

src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java
496 496
	 */
497 497
	private void resynch() throws Exception {
498 498
		// loop through all the [shared] entries and save any missing ones locally
499
		List<String> localPids = IdentifierManager.getInstance().getAllSystemMetadataGUIDs();
500
		logMetacat.debug("local pid count: " + localPids.size() + ", shared pid count: " + identifiers.size());
499 501
		for (Identifier pid: identifiers) {
500
			if (!IdentifierManager.getInstance().systemMetadataExists(pid.getValue())) {
502
			if (!localPids.contains(pid.getValue())) {
501 503
				SystemMetadata sm = systemMetadata.get(pid);
502
				saveLocally(sm);
504
				if (sm != null) {
505
					saveLocally(sm);
506
				}
503 507
			}
504 508
		}
505 509
	}

Also available in: Unified diff