Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slicer endpoint should not hang on new slicer creation resolves #659 … #667

Merged
merged 3 commits into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions lib/cluster/execution_controller/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ module.exports = function module(context, messaging, exStore, stateStore, execut
function _terminalError(err) {
const errMsg = parseError(err);
const executionStats = executionAnalytics.getAnalytics();
const errorMeta = exStore.failureMetaData(errMsg, executionStats);
const errorMeta = exStore.executionMetaData(executionStats, errMsg);
logger.error(errMsg);

exStore.setStatus(exId, 'failed', errorMeta)
Expand Down Expand Up @@ -353,7 +353,7 @@ module.exports = function module(context, messaging, exStore, stateStore, execut
isProcessing = false;
const errMsg = `slicer for ex ${exId} had an error, shutting down execution ${parseError(err)}`;
const executionStats = executionAnalytics.getAnalytics();
const errorMeta = exStore.failureMetaData(errMsg, executionStats);
const errorMeta = exStore.executionMetaData(executionStats, errMsg);
logger.error(errMsg);

exStore.setStatus(exId, 'failed', errorMeta)
Expand Down Expand Up @@ -479,9 +479,10 @@ module.exports = function module(context, messaging, exStore, stateStore, execut
}

function _setFailingStatus() {
logger.error(`slicer: ${exId} has encountered a processing_error`);
const errMsg = `slicer: ${exId} has encountered a processing_error`;
logger.error(errMsg);
const executionStats = executionAnalytics.getAnalytics();
const errorMeta = exStore.failureMetaData(null, executionStats);
const errorMeta = exStore.executionMetaData(executionStats, errMsg);
exStore.setStatus(exId, 'failing', errorMeta);
}

Expand All @@ -491,7 +492,7 @@ module.exports = function module(context, messaging, exStore, stateStore, execut
if (checkFn()) {
logger.error(logMsg);
const executionStats = executionAnalytics.getAnalytics();
const errorMetaData = exStore.failureMetaData(errMsg, executionStats);
const errorMetaData = exStore.executionMetaData(executionStats, errMsg);
exStore.setStatus(exId, 'failed', errorMetaData)
.then(() => {
messaging.send({
Expand Down Expand Up @@ -565,12 +566,12 @@ module.exports = function module(context, messaging, exStore, stateStore, execut

if (errCount > 0) {
const message = `execution: ${exId} had ${errCount} slice failures during processing`;
const errorMeta = exStore.failureMetaData(message, executionStats);
const errorMeta = exStore.executionMetaData(executionStats, message);
logger.error(message);
exStore.setStatus(exId, 'failed', errorMeta);
} else {
logger.info(`execution ${exId} has completed`);
const metaData = exStore.failureMetaData(false, executionStats);
const metaData = exStore.executionMetaData(executionStats);
exStore.setStatus(exId, 'completed', metaData);
}
messaging.send(msg);
Expand Down
2 changes: 1 addition & 1 deletion lib/cluster/execution_controller/recovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = function module(context, messaging, executionAnalytics, exStore
function _recoveryFailure(_errMsg) {
const errMsg = _errMsg.error || _errMsg;
const slicerAnalytics = executionAnalytics.getAnalytics();
const errorMeta = exStore.failureMetaData(errMsg, slicerAnalytics);
const errorMeta = exStore.executionMetaData(slicerAnalytics, errMsg);
logger.error(errMsg);

exStore.setStatus(exId, 'failed', errorMeta)
Expand Down
Loading