Skip to content

Commit

Permalink
Added support for Aurora cluster custom endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Goryudyuma authored and rusher committed Jan 29, 2021
1 parent 323b82b commit a4f85ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/mariadb/jdbc/HostAddress.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static List<HostAddress> parse(String spec, HaMode haMode) {
if (haMode == HaMode.AURORA) {
Pattern clusterPattern =
Pattern.compile(
"(.+)\\.(?:cluster-|cluster-ro-)([a-z0-9]+\\.[a-z0-9\\-]+\\.rds\\.amazonaws\\.com)",
"(.+)\\.(?:cluster-|cluster-ro-|cluster-custom-)([a-z0-9]+\\.[a-z0-9\\-]+\\.rds\\.amazonaws\\.com)",
Pattern.CASE_INSENSITIVE);
Matcher matcher = clusterPattern.matcher(spec);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class AuroraListener extends MastersReplicasListener {
private static final Logger logger = Logger.getLogger(AuroraListener.class.getName());
private final Pattern auroraDnsPattern =
Pattern.compile(
"(.+)\\.(cluster-|cluster-ro-)?([a-zA-Z0-9]+\\.[a-zA-Z0-9\\-]+\\.rds\\.amazonaws\\.com)",
"(.+)\\.(cluster-|cluster-ro-|cluster-custom-)?([a-zA-Z0-9]+\\.[a-zA-Z0-9\\-]+\\.rds\\.amazonaws\\.com)",
Pattern.CASE_INSENSITIVE);
private final HostAddress clusterHostAddress;
private String clusterDnsSuffix = null;
Expand Down

0 comments on commit a4f85ce

Please sign in to comment.