Revision 6917
Added by Chris Jones almost 13 years ago
src/edu/ucsb/nceas/metacat/dataone/CNodeService.java | ||
---|---|---|
1170 | 1170 |
throws InvalidToken, ServiceFailure, NotAuthorized, IdentifierNotUnique, |
1171 | 1171 |
UnsupportedType, InsufficientResources, InvalidSystemMetadata, |
1172 | 1172 |
NotImplemented, InvalidRequest { |
1173 |
|
|
1174 |
|
|
1173 |
|
|
1175 | 1174 |
// The lock to be used for this identifier |
1176 | 1175 |
Lock lock = null; |
1177 |
|
|
1176 |
|
|
1178 | 1177 |
try { |
1179 | 1178 |
lock = HazelcastService.getInstance().getLock(pid.getValue()); |
1180 | 1179 |
// are we allowed? |
... | ... | |
1192 | 1191 |
break; |
1193 | 1192 |
} |
1194 | 1193 |
} |
1194 |
} else { |
|
1195 |
|
|
1195 | 1196 |
} |
1196 | 1197 |
} |
1197 | 1198 |
|
... | ... | |
1202 | 1203 |
logMetacat.debug("Locked identifier " + pid.getValue()); |
1203 | 1204 |
sysmeta.setSerialVersion(BigInteger.ONE); |
1204 | 1205 |
sysmeta.setDateSysMetadataModified(Calendar.getInstance().getTime()); |
1206 |
sysmeta.setArchived(false); // this is a create op, not update |
|
1207 |
|
|
1208 |
// the CN should have set the origin and authoritative member node fields |
|
1209 |
try { |
|
1210 |
sysmeta.getOriginMemberNode().getValue(); |
|
1211 |
sysmeta.getAuthoritativeMemberNode().getValue(); |
|
1212 |
|
|
1213 |
} catch (NullPointerException npe) { |
|
1214 |
throw new InvalidSystemMetadata("4896", |
|
1215 |
"Both the origin and authoritative member node identifiers need to be set."); |
|
1216 |
|
|
1217 |
} |
|
1205 | 1218 |
pid = super.create(session, pid, object, sysmeta); |
1206 | 1219 |
|
1207 | 1220 |
} else { |
Also available in: Unified diff
For MNs that haven't set the archived flag to false on create(), set it here. Also, ensure that the CN sync code sets the authoritative and origin member node fields.