View Issue Details

IDProjectCategoryView StatusLast Update
0005638SymmetricDSBugpublic2022-12-16 15:00
Reporterelong Assigned Toelong  
Status closedResolutionfixed 
Product Version3.12.0 
Target Version3.14.4Fixed in Version3.14.4 
Summary0005638: Flush cache of routers when a router is changed
DescriptionRouter service caches information about routers so a change to a router may not be picked up immediately. It can cause an error during routing. If the default router is being used, and the user changes it to be a router that uses column data (like bsh, column, or subselect) then routing gets an error that column data is missing (column data is not selected for default routers).
Steps To Reproduce1. create table1 (id integer primary key, name varchar(10));
2. setup table to replicate
3. insert into table1 values (1, 'hello');
4. change router type to "bsh" with expression:

if (NAME != null && NAME.equalsIgnoreCase("no")) {
return false;
return true;

5. update table1 set name = 'hi' where id = 1

ERROR [server] [RouterService] [server-job-5] Failed to route and batch data on 'default' channel org.jumpmind.symmetric.SymmetricException: Failed to route data: 1147 for table: TABLE1.
    at org.jumpmind.symmetric.service.impl.RouterService.routeData(
    at org.jumpmind.symmetric.service.impl.RouterService.selectDataAndRoute(
    at org.jumpmind.symmetric.service.impl.RouterService.routeDataForChannel(
    at org.jumpmind.symmetric.service.impl.RouterService.routeDataForEachChannel(
    at org.jumpmind.symmetric.service.impl.RouterService.routeData(
    at org.jumpmind.symmetric.job.RouterJob.doJob(
    at org.jumpmind.symmetric.job.AbstractJob.invoke(
    at java.util.concurrent.Executors$
    at java.util.concurrent.FutureTask.runAndReset(
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(
    at java.util.concurrent.ScheduledThreadPoolExecutor$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.RuntimeException: Failed to evaluate bsh router script. Bound variables were: [log, initialLoad, dataMetaData, nodes, nodeIds, identityNodeId, targetNodes, engine, EXTERNAL_DATA]
    at org.jumpmind.symmetric.route.BshDataRouter.routeToNodes(
    at org.jumpmind.symmetric.service.impl.RouterService.routeData(
    ... 15 more
Caused by: Sourced file: inline evaluation of: ``if (NAME != null && NAME.equalsIgnoreCase("no")) { return false; } return true;'' : Attempt to resolve method: equalsIgnoreCase() on undefined variable or class name: NAME : at Line: 1 : in file: inline evaluation of: ``if (NAME != null && NAME.equalsIgnoreCase("no")) { return false; } return true;'' : NAME .equalsIgnoreCase ( "no" )

    at bsh.UtilEvalError.toEvalError(
    at bsh.UtilEvalError.toEvalError(
    at bsh.BSHMethodInvocation.eval(
    at bsh.BSHPrimaryExpression.eval(
    at bsh.BSHPrimaryExpression.eval(
    at bsh.BSHBinaryExpression.eval(
    at bsh.BSHIfStatement.evaluateCondition(
    at bsh.BSHIfStatement.eval(
    at bsh.Interpreter.eval(
    at bsh.Interpreter.eval(
    at bsh.Interpreter.eval(
    at org.jumpmind.symmetric.route.BshDataRouter.routeToNodes(
    ... 16 more


There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.14 9e4872a8

2022-12-16 14:18:25


Details Diff
0005638: Flush cache of routers when a router is changed Affected Issues
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/cache/ Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/cache/ Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/common/ Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/ Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/ Diff File

Issue History

Date Modified Username Field Change
2022-12-16 14:04 elong New Issue
2022-12-16 14:04 elong Status new => assigned
2022-12-16 14:04 elong Assigned To => elong
2022-12-16 14:04 elong Tag Attached: routing
2022-12-16 14:18 elong Status assigned => resolved
2022-12-16 14:18 elong Resolution open => fixed
2022-12-16 14:18 elong Fixed in Version => 3.14.4
2022-12-16 15:00 admin Changeset attached => SymmetricDS 3.14 9e4872a8
2023-01-16 20:59 admin Status resolved => closed