Project

General

Profile

« Previous | Next » 

Revision 7076

Notify each replica MN when critical portions of system metadata change so the MN can pull the latest copy into its store. AccessPolicy and RightsHolder changes are the most critical for the MN to keep updated on.

View differences:

src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
185 185
              systemMetadata.setSerialVersion(systemMetadata.getSerialVersion().add(BigInteger.ONE));
186 186
              systemMetadata.setDateSysMetadataModified(Calendar.getInstance().getTime());
187 187
              HazelcastService.getInstance().getSystemMetadataMap().put(systemMetadata.getIdentifier(), systemMetadata);
188
            
188
              notifyReplicaNodes(systemMetadata);
189
              
189 190
          } catch (RuntimeException e) {
190 191
              throw new ServiceFailure("4882", e.getMessage());
191 192
          
......
1032 1033
              systemMetadata.setSerialVersion(systemMetadata.getSerialVersion().add(BigInteger.ONE));
1033 1034
              systemMetadata.setDateSysMetadataModified(Calendar.getInstance().getTime());
1034 1035
              HazelcastService.getInstance().getSystemMetadataMap().put(pid, systemMetadata);
1036
              notifyReplicaNodes(systemMetadata);
1035 1037
              
1036 1038
          } catch (RuntimeException e) {
1037 1039
              throw new ServiceFailure("4490", e.getMessage());
......
1333 1335
              systemMetadata.setSerialVersion(systemMetadata.getSerialVersion().add(BigInteger.ONE));
1334 1336
              systemMetadata.setDateSysMetadataModified(Calendar.getInstance().getTime());
1335 1337
              HazelcastService.getInstance().getSystemMetadataMap().put(systemMetadata.getIdentifier(), systemMetadata);
1336
            
1338
              notifyReplicaNodes(systemMetadata);
1339
              
1337 1340
          } catch (RuntimeException e) {
1338 1341
              // convert Hazelcast RuntimeException to ServiceFailure
1339 1342
              throw new ServiceFailure("4430", e.getMessage());

Also available in: Unified diff