+ ", message: " + message);
_currentStateDelta.setState(partitionKey, _stateModel.getCurrentState());
}
else
{
StateTransitionError error =
new StateTransitionError(ErrorType.INTERNAL, ErrorCode.ERROR, exception);
if (exception instanceof InterruptedException)
{
if (_isTimeout)
{
error =
new StateTransitionError(ErrorType.INTERNAL,
ErrorCode.TIMEOUT,
exception);
}
else
{
// State transition interrupted but not caused by timeout. Keep the current
// state in this case
logger.error("State transition interrupted but not timeout. Not updating state. Partition : "
+ message.getPartitionName() + " MsgId : " + message.getMsgId());
return;
}
}
_stateModel.rollbackOnError(message, context, error);
_currentStateDelta.setState(partitionKey, "ERROR");
_stateModel.updateState("ERROR");
}
}
}
try
{
// Update the ZK current state of the node
PropertyKey key = keyBuilder.currentState(instanceName,
sessionId,
resource,
bucketizer.getBucketName(partitionKey));
if (!_message.getGroupMessageMode())
{
accessor.updateProperty(key, _currentStateDelta);
}
else
{
_executor._groupMsgHandler.addCurStateUpdate(_message, key, _currentStateDelta);
}
}
catch (Exception e)
{
logger.error("Error when updating the state ", e);
StateTransitionError error =
new StateTransitionError(ErrorType.FRAMEWORK, ErrorCode.ERROR, e);
_stateModel.rollbackOnError(message, context, error);
_statusUpdateUtil.logError(message,
HelixStateTransitionHandler.class,
e,
"Error when update the state ",