Project

General

Profile

« Previous | Next » 

Revision 7116

for SystemMetadata events we first check the event for the SM value. If it returns null, we look it up from the shared map. It seems as if we don't always get a value with our events.

View differences:

src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java
409 409
			PartitionService partitionService = Hazelcast.getPartitionService();
410 410
			Partition partition = partitionService.getPartition(event.getKey());
411 411
			Member ownerMember = partition.getOwner();
412
			SystemMetadata sysmeta = event.getValue();
412 413
			if (!ownerMember.localMember()) {
414
				if (sysmeta == null) {
415
					logMetacat.warn("No SystemMetadata provided in the event, getting from shared map: " + event.getKey().getValue());
416
					sysmeta = getSystemMetadataMap().get(event.getKey());
417
					if (sysmeta == null) {
418
						// this is a problem
419
						logMetacat.error("Could not find SystemMetadata in shared map for: " + event.getKey().getValue());
420
					}
421
				}
413 422
				// need to pull the entry into the local store
414 423
				saveLocally(event.getValue());
415 424
			}
......
418 427
			// warrants a replication event, what type (DATA, METADATA, RESOURCE),
419 428
			// iteratively lock the PID, create and submit the tasks, and expect a
420 429
			// result back. Deal with exceptions.
421
			SystemMetadata sysmeta = event.getValue();
422 430
			if (sysmeta != null) {
423 431
				boolean isMetadata = D1NodeService.isScienceMetadata(event.getValue());
424 432
				// TODO: do we need to do anything explicit here?

Also available in: Unified diff