Revision 9480
Added by Jing Tao about 9 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
645 | 645 |
NodeReference sourceNode) throws NotImplemented, ServiceFailure, |
646 | 646 |
NotAuthorized, InvalidRequest, InsufficientResources, |
647 | 647 |
UnsupportedType { |
648 |
if(isReadOnlyMode()) { |
|
648 |
/*if(isReadOnlyMode()) {
|
|
649 | 649 |
throw new InvalidRequest("2153", "The Metacat member node is on the read-only mode and your request can't be fulfiled. Please try again later."); |
650 |
} |
|
650 |
}*/
|
|
651 | 651 |
|
652 | 652 |
if (session != null && sysmeta != null && sourceNode != null) { |
653 | 653 |
logMetacat.info("MNodeService.replicate() called with parameters: \n" + |
src/edu/ucsb/nceas/metacat/restservice/v1/MNResourceHandler.java | ||
---|---|---|
860 | 860 |
UnsupportedType, InstantiationException, IllegalAccessException, InvalidToken { |
861 | 861 |
|
862 | 862 |
logMetacat.debug("in POST replicate()"); |
863 |
ReadOnlyChecker checker = new ReadOnlyChecker(); |
|
864 |
boolean isReadOnlyMode = checker.isReadOnly(); |
|
865 |
if(isReadOnlyMode) { |
|
866 |
throw new InvalidRequest("2153", "The Metacat member node is on the read-only mode and your request can't be fulfiled. Please try again later."); |
|
867 |
} |
|
863 | 868 |
|
864 | 869 |
// somewhat unorthodox, but the call is asynchronous and we'd like to return this info sooner |
865 | 870 |
boolean allowed = false; |
src/edu/ucsb/nceas/metacat/restservice/v2/MNResourceHandler.java | ||
---|---|---|
973 | 973 |
UnsupportedType, InstantiationException, IllegalAccessException, InvalidToken { |
974 | 974 |
|
975 | 975 |
logMetacat.debug("in POST replicate()"); |
976 |
ReadOnlyChecker checker = new ReadOnlyChecker(); |
|
977 |
boolean isReadOnlyMode = checker.isReadOnly(); |
|
978 |
if(isReadOnlyMode) { |
|
979 |
throw new InvalidRequest("2153", "The Metacat member node is on the read-only mode and your request can't be fulfiled. Please try again later."); |
|
980 |
} |
|
976 | 981 |
|
977 | 982 |
// somewhat unorthodox, but the call is asynchronous and we'd like to return this info sooner |
978 | 983 |
boolean allowed = false; |
Also available in: Unified diff
In the replicate method, the checking of the read-only mode was moved from MNodeService class to the MNResourceHandler class since it is asynchronized.