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

QueryHost force abort when expired in continuations mode #481

Merged
merged 2 commits into from May 19, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -275,6 +275,9 @@ public void run () {
if (prof != null)
prof.reenable();
pausedCounter.decrementAndGet();

if (evt != null && abort)
evt.addMessage (" [force abort]");
}
} else
pt = null;
Expand Down Expand Up @@ -312,7 +315,8 @@ public void run () {
if (prof == null)
prof = new Profiler();
else
prof.checkPoint("resume");
prof.checkPoint("resume" +
(pt != null && pt.isAborting() ? " [force abort]" : ""));
}
snapshot (id, context, PREPARING);
setThreadLocal(id, context);
Expand Down
Expand Up @@ -100,16 +100,19 @@ public int prepare (long id, Serializable ser) {
return PREPARED | NO_JOIN | READONLY;
}

@Override
public void responseReceived (ISOMsg resp, Object handBack) {
Context ctx = (Context) handBack;
ctx.put (responseName, resp);
ctx.resume();
}
@Override
public void expired (Object handBack) {
Context ctx = (Context) handBack;
String ds = ctx.getString(destination);
String muxName = cfg.get ("mux." + ds , "mux." + ds);
ctx.getResult().fail(CMF.HOST_UNREACHABLE, Caller.info(), "'%s' does not respond", muxName).FAIL();
ctx.getPausedTransaction().forceAbort();
ctx.resume();
}

Expand Down