throw exception if an object is a valid id and it is not present on backend after the retry mechanism

This commit is contained in:
Roberto Cirillo 2021-09-09 12:25:13 +02:00
parent af016382fe
commit 20e3993af2
2 changed files with 5 additions and 0 deletions

View File

@ -669,6 +669,10 @@ public class MongoIOManager {
f=null;
}
}
if (f==null) {
logger.warn("The objectID is not present. Going to abort the current operation");
throw new RemoteBackendException("Object id "+serverLocation+" not found.");
}
// if the remote identifier is not a specified as ID, try to check if it is a valid remote path
// in this case the remote identifier is a valid objectID but it indicates a path
}else if ((remoteResourceIdentifier != null) && (!(remoteResourceIdentifier.equals(REMOTE_RESOURCE.ID))) && (f==null)){

View File

@ -290,6 +290,7 @@ public class SoftCopyOperator extends SoftCopy {
*/
private boolean isMap(GridFSDBFile sourceObject) {
String type=sourceObject.get("type").toString();
logger.debug("object type: "+type);
if(type.equals("map"))
return true;
return false;