Skip to content

Commit

Permalink
Adapter: Update default port
Browse files Browse the repository at this point in the history
`NoriaAdapter::default_address` is set to indicate where to listen for
incoming connections if an address is not provided as an argument.

This CL updates the port of `default_address` to 3307 for MySQL and
5433 for Postgres. Currently, the default is 3306 for both.

Release-Note-Core: Changes the default listening address of a ReadySet
  adapter to 127.0.0.1:3307 or 127.0.0.1:5433 when connected to a MySQL
  or Postgres upstream database respectively.
Change-Id: I897ac432a143238d8caff94735f03511599b4f0d
Reviewed-on: https://gerrit.readyset.name/c/readyset/+/5602
Tested-by: Buildkite CI
Reviewed-by: Luke Osborne <luke@readyset.io>
  • Loading branch information
Dan Wilbanks committed Aug 4, 2023
1 parent 863c76f commit 0491795
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions readyset/src/lib.rs
Expand Up @@ -134,6 +134,7 @@ where
{
pub description: &'static str,
pub default_address: SocketAddr,
/// Address used to listen for incoming connections
pub connection_handler: H,
pub database_type: DatabaseType,
/// SQL dialect to use when parsing queries
Expand Down
4 changes: 2 additions & 2 deletions readyset/src/main.rs
Expand Up @@ -12,7 +12,7 @@ fn main() -> anyhow::Result<()> {
match options.database_type()? {
DatabaseType::MySQL => NoriaAdapter {
description: "MySQL adapter for ReadySet.",
default_address: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 3306),
default_address: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 3307),
connection_handler: MySqlHandler {
enable_statement_logging: options.tracing.statement_logging,
},
Expand All @@ -23,7 +23,7 @@ fn main() -> anyhow::Result<()> {
.run(options),
DatabaseType::PostgreSQL => NoriaAdapter {
description: "PostgreSQL adapter for ReadySet.",
default_address: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 3306),
default_address: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 5433),
connection_handler: PsqlHandler::new(readyset::psql::Config {
options: options.psql_options.clone(),
enable_statement_logging: options.tracing.statement_logging,
Expand Down

0 comments on commit 0491795

Please sign in to comment.