RestErrorHandler.writeErrorResponse(messageEvent,
NOT_FOUND,
"Non Existing key/version. Nothing to delete");
break;
}
DeleteResponseSender responseConstructor = new DeleteResponseSender(messageEvent);
responseConstructor.sendResponse(performanceStats,
fromLocalZone,
requestObject.getRequestOriginTimeInMs());
} catch(Exception e) {
deleteErrorHandler.handleExceptions(messageEvent, e);
}
break;
case VoldemortOpCode.GET_VERSION_OP_CODE:
if(logger.isDebugEnabled()) {
logger.debug("Incoming get version request");
}
try {
List<Version> versions = store.getVersions(requestObject.getKey());
// handle non existing key
if(versions.size() > 0) {
GetVersionResponseSender responseConstructor = new GetVersionResponseSender(messageEvent,
requestObject.getKey(),
versions,
storeName);
responseConstructor.sendResponse(performanceStats,
fromLocalZone,
requestObject.getRequestOriginTimeInMs());
} else {
logger.error("Error when doing getversion. Key does not exist or key is null");