View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005638 | SymmetricDS | Bug | public | 2022-12-16 14:04 | 2022-12-16 15:00 |
Reporter | elong | Assigned To | elong | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.12.0 | ||||
Target Version | 3.14.4 | Fixed in Version | 3.14.4 | ||
Summary | 0005638: Flush cache of routers when a router is changed | ||||
Description | Router 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 Reproduce | 1. 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(RouterService.java:861) at org.jumpmind.symmetric.service.impl.RouterService.selectDataAndRoute(RouterService.java:725) at org.jumpmind.symmetric.service.impl.RouterService.routeDataForChannel(RouterService.java:485) at org.jumpmind.symmetric.service.impl.RouterService.routeDataForEachChannel(RouterService.java:265) at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:200) at org.jumpmind.symmetric.job.RouterJob.doJob(RouterJob.java:47) at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:202) at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:273) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) 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(BshDataRouter.java:81) at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:842) ... 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(UtilEvalError.java:79) at bsh.UtilEvalError.toEvalError(UtilEvalError.java:84) at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:93) at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:96) at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:41) at bsh.BSHBinaryExpression.eval(BSHBinaryExpression.java:117) at bsh.BSHIfStatement.evaluateCondition(BSHIfStatement.java:57) at bsh.BSHIfStatement.eval(BSHIfStatement.java:40) at bsh.Interpreter.eval(Interpreter.java:659) at bsh.Interpreter.eval(Interpreter.java:750) at bsh.Interpreter.eval(Interpreter.java:739) at org.jumpmind.symmetric.route.BshDataRouter.routeToNodes(BshDataRouter.java:69) ... 16 more | ||||
Tags | routing | ||||
SymmetricDS: 3.14 9e4872a8 2022-12-16 14:18:25 Details Diff |
0005638: Flush cache of routers when a router is changed |
Affected Issues 0005638 |
|
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/cache/CacheManager.java | Diff File | ||
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/cache/ICacheManager.java | Diff File | ||
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/common/ConfigurationChangedHelper.java | Diff File | ||
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/IRouterService.java | Diff File | ||
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/RouterService.java | Diff File |
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 |