Project

General

Profile

« Previous | Next » 

Revision 6449

only "save" to the shared system metadata map - not directly to the table store.

View differences:

CNodeService.java
145 145
    systemMetadata.setReplicationPolicy(policy);
146 146
    
147 147
    // update the metadata
148
    try {
149
      IdentifierManager.getInstance().updateSystemMetadata(systemMetadata);
150
    } catch (McdbDocNotFoundException e) {
151
      throw new ServiceFailure("4882", e.getMessage());
152
    }
148
    HazelcastService.getInstance().getSystemMetadataMap().put(systemMetadata.getIdentifier(), systemMetadata);
153 149

  
154 150
    return true;
155 151
  }
......
205 201
    systemMetadata.setReplicaList(replicas);
206 202
    
207 203
    // update the metadata
208
    try {
209
      IdentifierManager.getInstance().updateSystemMetadata(systemMetadata);
210
    } catch (McdbDocNotFoundException e) {
211
      throw new ServiceFailure("4700", e.getMessage());
212
    }
204
    HazelcastService.getInstance().getSystemMetadataMap().put(systemMetadata.getIdentifier(), systemMetadata);
213 205

  
214 206
    return true;
215 207
  }
......
596 588
        // update the system metadata into the object store
597 589
        logMetacat.debug("Starting to update SystemMetadata...");
598 590
        sysmeta.setDateSysMetadataModified(new Date());
599
        try {
600
          IdentifierManager.getInstance().updateSystemMetadata(sysmeta);
601
          // force replication of this record
602
          ForceReplicationSystemMetadataHandler forceReplication = 
603
            new ForceReplicationSystemMetadataHandler(guid.getValue(), null);
604
        } catch (Exception e) {
605
            throw new ServiceFailure("4862", "Error updating system metadata: " + e.getClass() + ": " + e.getMessage());
606
        }
591
        HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta);
607 592
        
608 593
        logMetacat.debug("Returning from updateSystemMetadata");
609 594
        EventLog.getInstance().log(null, session.getSubject().getValue(), guid.getValue(), "updateSystemMetadata");
......
720 705
    systemMetadata.setRightsHolder(userId);
721 706
    
722 707
    // update the metadata
723
    try {
724
      IdentifierManager.getInstance().updateSystemMetadata(systemMetadata);
725
    } catch (McdbDocNotFoundException e) {
726
      throw new ServiceFailure("4490", e.getMessage());
727
    }
708
    HazelcastService.getInstance().getSystemMetadataMap().put(systemMetadata.getIdentifier(), systemMetadata);
728 709

  
729 710
    return pid;
730 711
  }

Also available in: Unified diff