Skip to content

feat: GDB Failover#625

Open
karenc-bq wants to merge 1 commit intorefactor/monitor-servicefrom
feat/gdb-failover
Open

feat: GDB Failover#625
karenc-bq wants to merge 1 commit intorefactor/monitor-servicefrom
feat/gdb-failover

Conversation

@karenc-bq
Copy link
Contributor

Summary

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq karenc-bq requested a review from a team as a code owner March 13, 2026 18:09
@karenc-bq karenc-bq changed the base branch from main to refactor/monitor-service March 13, 2026 18:10
@karenc-bq karenc-bq force-pushed the feat/gdb-failover branch 3 times, most recently from cc4c6aa to bcc243b Compare March 15, 2026 08:39
@karenc-bq karenc-bq force-pushed the refactor/monitor-service branch from 81930fe to 00d8176 Compare March 15, 2026 09:18
}

forceMonitoringRefresh(shouldVerifyWriter: boolean, timeoutMs: number): Promise<HostInfo[]> {
throw new AwsWrapperError("ConnectionStringHostListProvider does not support forceMonitoringRefresh.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we place this in messages?

}

override async failoverReader(): Promise<void> {
throw new UnsupportedMethodError("This method should not be used in this class. See failover() method for implementation details.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add these to the messages file?

expect(returnConn).toBe(mockInitialClientWrapper);
});

it("test_get_verified_connection_cluster_inet_address_none", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to add some tests for the new functionality of stale dns helper?

1320000
);
});
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering about adding some tests for when the failover would not be successful? ie. out of region or no allowed hosts?

}

// Check writer region to determine failover mode
const writerRegion = this.rdsHelper.getRdsRegion(writerCandidate.host);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this return null? Would we have issues if it does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equalsIgnoreCase has null checks and would return false if writerRegion is null

return new Promise((resolve) => setTimeout(resolve, 100));
}

override async failoverReader(): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to throw a thought out there, would it make sense to just make the failoverReader method private in the base class and not override these to do nothing?

Answer to that question might be more on what other failover plugins we plan to do.

}

logger.debug(Messages.get("Failover.establishedConnection", this.pluginService.getCurrentHostInfo()?.host ?? "unknown"));
this.throwFailoverSuccessException();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In terms of telemetry, I think we only record it in failoverToWriter. But I don't think we do it for failoverToAllowedHost right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants