Skip to content

Conversation

@utsab4u
Copy link

@utsab4u utsab4u commented Nov 2, 2023

Anyone planning to use the multi master current needs to implement the following methods

               @Override
                protected boolean enableMultiMaster(){
                    return true; //default false
                }

                @Override
                protected int shardCount(){
                    return 3; //default numShards. Needs to be the total number of shardBundles required across all shards
                }

The current config looks like

  shards:
    - driverClass: org.mariadb.jdbc.Driver
      user: username
      password: password
      url: jdbc:mariadb:sequential://vip1/shard_1
      ..........
      ........
    - driverClass: org.mariadb.jdbc.Driver
      user: username
      password: password
      url: jdbc:mariadb:sequential://vip2/shard_2
      ..........
      ........

The new config would looks like

  shards:
    - driverClass: org.mariadb.jdbc.Driver
      user: username
      password: password
      url: jdbc:mariadb://vip1-1/shard_1, jdbc:mariadb:sequential://vip1-2/shard_1 
      ..........
      ........
    - driverClass: org.mariadb.jdbc.Driver
      user: username
      password: password
      url: jdbc:mariadb://vip2/shard_2 //not using multiple vips
      ..........
      ........

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.

2 participants