Revision 9335
Added by Jing Tao over 8 years ago
CNodeService.java | ||
---|---|---|
2199 | 2199 |
throw new NotAuthorized("4861", "The client -"+ session.getSubject().getValue()+ "is not authorized for updating the system metadata of the object "+pid.getValue()); |
2200 | 2200 |
} |
2201 | 2201 |
} |
2202 |
//update the system metadata locally |
|
2203 |
boolean success = super.updateSystemMetadata(session, pid, sysmeta); |
|
2202 |
|
|
2203 |
//update the system metadata locally |
|
2204 |
boolean success = false; |
|
2205 |
try { |
|
2206 |
HazelcastService.getInstance().getSystemMetadataMap().lock(pid); |
|
2207 |
SystemMetadata currentSysmeta = HazelcastService.getInstance().getSystemMetadataMap().get(pid); |
|
2208 |
if(currentSysmeta == null) { |
|
2209 |
throw new InvalidRequest("4863", "We can't find the current system metadata on the member node for the id "+pid.getValue()); |
|
2210 |
} |
|
2211 |
boolean needUpdateModificationDate = false;//cn doesn't need to change the modification date. |
|
2212 |
success = updateSystemMetadata(session, pid, sysmeta, needUpdateModificationDate, currentSysmeta); |
|
2213 |
} finally { |
|
2214 |
HazelcastService.getInstance().getSystemMetadataMap().unlock(pid); |
|
2215 |
} |
|
2204 | 2216 |
return success; |
2205 | 2217 |
} |
2206 | 2218 |
|
Also available in: Unified diff
Add the code to check the date of system metadata modification match in MN.updateSystemMetadata only. CN.updateSystemMetadata doesn't check.