From d640937fe13849f6bf3511db332e40275e744bfb Mon Sep 17 00:00:00 2001 From: Crystal Liang Date: Wed, 5 Feb 2025 16:27:46 -0800 Subject: [PATCH] fix: init failover settings before creating reader and writer failover handlers --- common/lib/plugins/failover/failover_plugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/lib/plugins/failover/failover_plugin.ts b/common/lib/plugins/failover/failover_plugin.ts index cc734472..d0473250 100644 --- a/common/lib/plugins/failover/failover_plugin.ts +++ b/common/lib/plugins/failover/failover_plugin.ts @@ -101,6 +101,9 @@ export class FailoverPlugin extends AbstractConnectionPlugin { this._properties = properties; this.pluginService = pluginService; this._rdsHelper = rdsHelper; + + this.initSettings(); + this._readerFailoverHandler = readerFailoverHandler ? readerFailoverHandler : new ClusterAwareReaderFailoverHandler( @@ -120,7 +123,6 @@ export class FailoverPlugin extends AbstractConnectionPlugin { this.failoverClusterTopologyRefreshRateMsSetting, this.failoverWriterReconnectIntervalMsSetting ); - this.initSettings(); this._staleDnsHelper = new StaleDnsHelper(this.pluginService); const telemetryFactory = this.pluginService.getTelemetryFactory();