Index: src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataone/CNodeService.java	(revision 6875)
+++ src/edu/ucsb/nceas/metacat/dataone/CNodeService.java	(revision 6876)
@@ -256,56 +256,32 @@
               replicas = systemMetadata.getReplicaList();
               int count = 0;
               
-              if ( replicas == null || replicas.size() < 1 ) {
-                  logMetacat.debug("No replicas to evaluate for " + pid.getValue());
-                  Replica newReplica = new Replica();
-                  newReplica.setReplicaMemberNode(targetNode);
-                  newReplica.setReplicationStatus(status);
-                  newReplica.setReplicaVerified(Calendar.getInstance().getTime());
-                  try {
-                    // if there is no replica entry, create one
-                    updateReplicationMetadata(session, pid, newReplica, 
-                        systemMetadata.getSerialVersion().longValue());
-                    
-                  } catch (VersionMismatch e) {
-                      // try again if we somehow don't have the correct version
-                      String msg = "The serial version of the system metadata doesn't match. Trying again.";
-                      logMetacat.info(msg);
-                      systemMetadata = HazelcastService.getInstance().getSystemMetadataMap().get(pid);
-                      try {
-                        updateReplicationMetadata(session, pid, newReplica, 
-                            systemMetadata.getSerialVersion().longValue());
-                        
-                      } catch (VersionMismatch e1) {
-                          throw new ServiceFailure("4700", 
-                              "Couldn't get the correct serial version of the system metadata: " +
-                              e1.getCause().getMessage());
-                          
-                      }
-
-                  }
-                  
+              // was there a failure? log it
+              if ( failure != null && status == ReplicationStatus.FAILED ) {
+                 String msg = "The replication request of the object identified by " + 
+                     pid.getValue() + " failed.  The error message was " +
+                     failure.getMessage() + ".";
               }
               
-              // refresh the system metadata and replica list
-              systemMetadata = HazelcastService.getInstance().getSystemMetadataMap().get(pid);
-              replicas = systemMetadata.getReplicaList();
+              if (replicas.size() > 0 && replicas != null) {
+                  // find the target replica index in the replica list
+                  for (Replica replica : replicas) {
+                      String replicaNodeStr = replica.getReplicaMemberNode()
+                              .getValue();
+                      String targetNodeStr = targetNode.getValue();
+                      logMetacat.debug("Comparing " + replicaNodeStr + " to "
+                              + targetNodeStr);
                   
-              // find the target replica index in the replica list
-              for (Replica replica: replicas) {
-                  String replicaNodeStr = replica.getReplicaMemberNode().getValue();
-                  String targetNodeStr = targetNode.getValue();
-                  logMetacat.debug("Comparing " + replicaNodeStr + " to " + targetNodeStr);
+                      if (replicaNodeStr.equals(targetNodeStr)) {
+                          replicaEntryIndex = count;
+                          logMetacat.debug("replica entry index is: "
+                                  + replicaEntryIndex);
+                          break;
+                      }
+                      count++;
                   
-                  if (replicaNodeStr.equals(targetNodeStr)) {
-                      replicaEntryIndex = count;
-                      logMetacat.debug("replica entry index is: " + replicaEntryIndex);
-                      break;
                   }
-                  count++;
-                  
               }
-
               // are we allowed to do this? only CNs and target MNs are allowed
               CNode cn = D1Client.getCN();
               List<Node> nodes = cn.listNodes().getNodeList();
@@ -332,22 +308,20 @@
                   }
               }
 
-              if ( !allowed && !isAdminAuthorized(session, pid, Permission.WRITE)) {
-                  String msg = "The subject identified by " + subject.getValue() +
-                    " does not have permission to set the replication status for " +
-                    "the replica identified by " + targetNode.getValue() + ".";
-                  logMetacat.info(msg);
-                  throw new NotAuthorized("4720", msg);
+              if ( !isAdminAuthorized(session, pid, Permission.WRITE) ) {
+                  if (!allowed) {
+                    String msg = "The subject identified by "
+                            + subject.getValue()
+                            + " does not have permission to set the replication status for "
+                            + "the replica identified by "
+                            + targetNode.getValue() + ".";
+                    logMetacat.info(msg);
+                    throw new NotAuthorized("4720", msg);
+                }
                   
               }
               
-              // was there a failure? log it
-              if ( failure != null && status == ReplicationStatus.FAILED ) {
-                 String msg = "The replication request of the object identified by " + 
-                     pid.getValue() + " failed.  The error message was " +
-                     failure.getMessage() + ".";
-              }
-              
+
           } catch (RuntimeException e) { // Catch is generic since HZ throws RuntimeException
             throw new NotFound("4740", "No record found for: " + pid.getValue() +
                 " : " + e.getMessage());
@@ -354,9 +328,10 @@
             
           }
           
+          Replica targetReplica = new Replica();
           // set the status for the replica
           if ( replicaEntryIndex != -1 ) {
-              Replica targetReplica = replicas.get(replicaEntryIndex);
+              targetReplica = replicas.get(replicaEntryIndex);
               targetReplica.setReplicationStatus(status);
               logMetacat.debug("Set the replication status for " + 
                   targetReplica.getReplicaMemberNode().getValue() + " to " +
@@ -363,8 +338,12 @@
                   targetReplica.getReplicationStatus());
               
           } else {
-              throw new InvalidRequest("4730", "There are no replicas to update.");
-
+              // this is a new entry, create it
+              targetReplica.setReplicaMemberNode(targetNode);
+              targetReplica.setReplicationStatus(status);
+              targetReplica.setReplicaVerified(Calendar.getInstance().getTime());
+              replicas.add(targetReplica);
+              
           }
           
           systemMetadata.setReplicaList(replicas);
