Skip to content

Commit

Permalink
cells: Suppress illegal state exception during initialization
Browse files Browse the repository at this point in the history
Motivation:

If a cell is killed while it is initializing it currently throws
an illegal state exception which in turn is logged as a bug.

Modification:

Simple workaround to catch and suppress the exception and abort
the cell initialization.

This part of the code is rewritten on master, so a simple workaround
is good enough for stable branches.

Result:

An illegal state exception thrown during aborted startup has been
resolved.

Target: 2.14
Request: 2.14
Request: 2.13
Request: 2.12
Request: 2.11
Request: 2.10
Ticket: http://rt.dcache.org/Ticket/Display.html?id=8881
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/8984/
(cherry picked from commit 84acc3c)
  • Loading branch information
gbehrmann committed Feb 1, 2016
1 parent 8e7fbb8 commit 902503e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,17 @@ protected void executeInit()
*/
createContext();

try {
/* Cell threading is configurable through arguments to
* UniversalSpringCell. The executors have to be created as
* beans in the Spring file, however the names of the beans
* are provided as cell arguments.
*/
setupCellExecutors(args.getOpt("messageExecutor"));
setupCellExecutors(args.getOpt("messageExecutor"));
} catch (IllegalStateException e) {
LOGGER.debug("Aborting cell initialization due to illegal state exception while setting executors.");
return;
}

/* This is a NOP except if somebody subclassed
* UniversalSpringCell.
Expand Down

0 comments on commit 902503e

Please sign in to comment.