Project

General

Profile

« Previous | Next » 

Revision 9337

Added by Jing Tao over 9 years ago

CN.updateSystemMetadata will ignore the serial version and replica list in the comming system metadata from the mn.

View differences:

src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
2205 2205
    try {
2206 2206
        HazelcastService.getInstance().getSystemMetadataMap().lock(pid);
2207 2207
        SystemMetadata currentSysmeta = HazelcastService.getInstance().getSystemMetadataMap().get(pid);
2208
       
2208 2209
        if(currentSysmeta == null) {
2209 2210
            throw  new InvalidRequest("4863", "We can't find the current system metadata on the member node for the id "+pid.getValue());
2210 2211
        }
2212
        // CN will ignore the comming serial version and replica list fields from the mn node. 
2213
        BigInteger currentSerialVersion = currentSysmeta.getSerialVersion();
2214
        sysmeta.setSerialVersion(currentSerialVersion);
2215
        List<Replica> replicas = currentSysmeta.getReplicaList();
2216
        sysmeta.setReplicaList(replicas);
2211 2217
        boolean needUpdateModificationDate = false;//cn doesn't need to change the modification date.
2212 2218
        success = updateSystemMetadata(session, pid, sysmeta, needUpdateModificationDate, currentSysmeta);
2213 2219
    } finally {

Also available in: Unified diff