Project

General

Profile

« Previous | Next » 

Revision 7342

only publish to the missing pid "wanted list" when resynching system metadata. we were seeing redundant entry added/updated events when looking up the shared systemmetadata first.

View differences:

src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java
546 546
		Iterator<Identifier> missingPids = missingIdKeys.iterator();
547 547
		while (missingPids.hasNext()) {
548 548
			Identifier pid = missingPids.next();
549
			logMetacat.trace("Processing missing pid: " + pid.getValue());
550
			SystemMetadata sm = systemMetadata.get(pid);
551
			if (sm == null)  {
552
				logMetacat.warn("Shared SystemMetadata is null for pid: " + pid.getValue());
553

  
554
				// publish that we need this SM entry
555
				logMetacat.debug("Publishing missing pid to wanted list: " + pid.getValue());
556
				missingIdentifiers.add(pid);
557
			} else {
558
				// or just republish the shared non-null entry (all SM listeners will then get it and save it locally)
559
				logMetacat.debug("Putting missing pid's SystemMetadata to shared map: " + pid.getValue());
560
				systemMetadata.put(pid, sm);
561
			}
549
			// publish that we need this SM entry
550
			logMetacat.debug("Publishing missing pid to wanted list: " + pid.getValue());
551
			missingIdentifiers.add(pid);
562 552
		}
563 553
		
564 554
	}

Also available in: Unified diff