diff --git a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/route/ShadowSQLRouter.java b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/route/ShadowSQLRouter.java index ee3a4a6216629..854721b29ca8f 100644 --- a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/route/ShadowSQLRouter.java +++ b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/route/ShadowSQLRouter.java @@ -34,10 +34,12 @@ @HighFrequencyInvocation public final class ShadowSQLRouter implements DecorateSQLRouter { + private final ShadowRouteEngine routeEngine = new ShadowRouteEngine(); + @Override public void decorateRouteContext(final RouteContext routeContext, final QueryContext queryContext, final ShardingSphereDatabase database, final ShadowRule rule, final ConfigurationProperties props) { - new ShadowRouteEngine().route(routeContext, rule, ShadowDataSourceMappingsFinderFactory.newInstance(queryContext)); + routeEngine.route(routeContext, rule, ShadowDataSourceMappingsFinderFactory.newInstance(queryContext)); } @Override