<h2 dir="auto">Bug report</h2>
<h3 dir="auto">Is your feature request related to a problem?</h3>
<p dir="auto">Yes</p>
<h3 dir="auto">Describe the feature you would like.</h3>
<h4 dir="auto">First, I started a local zk cluster via docker.</h4>
<p dir="auto">create a file docker-compose.yml</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="version: '2'
services:
    zoo1:
        image: zookeeper
        restart: always
        container_name: zoo1
        ports:
            - &quot;2181:2181&quot;
        environment:
            ZOO_MY_ID: 1
            ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181

    zoo2:
        image: zookeeper
        restart: always
        container_name: zoo2
        ports:
            - &quot;2182:2181&quot;
        environment:
            ZOO_MY_ID: 2
            ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
    zoo3:
        image: zookeeper
        restart: always
        container_name: zoo3
        ports:
            - &quot;2183:2181&quot;
        environment:
            ZOO_MY_ID: 3
            ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181"><pre class="notranslate"><code class="notranslate">version: '2'
services:
    zoo1:
        image: zookeeper
        restart: always
        container_name: zoo1
        ports:
            - "2181:2181"
        environment:
            ZOO_MY_ID: 1
            ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181

    zoo2:
        image: zookeeper
        restart: always
        container_name: zoo2
        ports:
            - "2182:2181"
        environment:
            ZOO_MY_ID: 2
            ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
    zoo3:
        image: zookeeper
        restart: always
        container_name: zoo3
        ports:
            - "2183:2181"
        environment:
            ZOO_MY_ID: 3
            ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
</code></pre></div>
<p dir="auto">Then run</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="COMPOSE_PROJECT_NAME=zk_test docker-compose up"><pre class="notranslate"><code class="notranslate">COMPOSE_PROJECT_NAME=zk_test docker-compose up
</code></pre></div>
<h4 dir="auto">second I start proxy</h4>
<p dir="auto">Proxy server.ymal</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mode:
  type: Cluster
  repository:
    type: ZooKeeper
    props:
      namespace: agent
      server-lists: 127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183
      retryIntervalMilliseconds: 500
      timeToLiveSeconds: 60
      maxRetries: 3
      operationTimeoutMilliseconds: 30000
  overwrite: true
#
rules:
  - !AUTHORITY
    users:
      - root@%:root
      - sharding@:sharding
    provider:
      type: ALL_PRIVILEGES_PERMITTED

props:
  max-connections-size-per-query: 1
  executor-size: 16  # Infinite by default.
  proxy-frontend-flush-threshold: 128  # The default value is 128.
  proxy-opentracing-enabled: false
  proxy-hint-enabled: true
  sql-show: false
  check-table-metadata-enabled: false
  lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
  # show-process-list-enabled: true
  # show-process-list-async-thread-num: 100
  # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
  # The default value is -1, which means set the minimum value for different JDBC drivers.
  proxy-backend-query-fetch-size: -1
  check-duplicate-table-enabled: false"><pre class="notranslate"><code class="notranslate">mode:
  type: Cluster
  repository:
    type: ZooKeeper
    props:
      namespace: agent
      server-lists: 127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183
      retryIntervalMilliseconds: 500
      timeToLiveSeconds: 60
      maxRetries: 3
      operationTimeoutMilliseconds: 30000
  overwrite: true
#
rules:
  - !AUTHORITY
    users:
      - root@%:root
      - sharding@:sharding
    provider:
      type: ALL_PRIVILEGES_PERMITTED

props:
  max-connections-size-per-query: 1
  executor-size: 16  # Infinite by default.
  proxy-frontend-flush-threshold: 128  # The default value is 128.
  proxy-opentracing-enabled: false
  proxy-hint-enabled: true
  sql-show: false
  check-table-metadata-enabled: false
  lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
  # show-process-list-enabled: true
  # show-process-list-async-thread-num: 100
  # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
  # The default value is -1, which means set the minimum value for different JDBC drivers.
  proxy-backend-query-fetch-size: -1
  check-duplicate-table-enabled: false
</code></pre></div>
<h4 dir="auto">Errors</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO ] 2022-03-23 12:10:50.174 [_finished_check_Worker-1-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {server.1=zoo1:2888:3888:participant;0.0.0.0:2181, version=0, server.3=zoo3:2888:3888:participant;0.0.0.0:2181, server.2=zoo2:2888:3888:participant;0.0.0.0:2181}
[ERROR] 2022-03-23 12:10:50.174 [_finished_check_Worker-1-EventThread] o.a.c.f.imps.CuratorFrameworkImpl - Background exception was not retry-able or retry gave up
java.lang.NullPointerException: null
	at org.apache.curator.utils.Compatibility.getHostAddress(Compatibility.java:116)
	at org.apache.curator.framework.imps.EnsembleTracker.configToConnectionString(EnsembleTracker.java:185)
	at org.apache.curator.framework.imps.EnsembleTracker.processConfigData(EnsembleTracker.java:206)
	at org.apache.curator.framework.imps.EnsembleTracker.access$300(EnsembleTracker.java:50)
	at org.apache.curator.framework.imps.EnsembleTracker$2.processResult(EnsembleTracker.java:150)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:892)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:649)
	at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152)
	at org.apache.curator.framework.imps.GetConfigBuilderImpl$2.processResult(GetConfigBuilderImpl.java:222)
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:630)
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:551)
"><pre class="notranslate"><code class="notranslate">[INFO ] 2022-03-23 12:10:50.174 [_finished_check_Worker-1-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {server.1=zoo1:2888:3888:participant;0.0.0.0:2181, version=0, server.3=zoo3:2888:3888:participant;0.0.0.0:2181, server.2=zoo2:2888:3888:participant;0.0.0.0:2181}
[ERROR] 2022-03-23 12:10:50.174 [_finished_check_Worker-1-EventThread] o.a.c.f.imps.CuratorFrameworkImpl - Background exception was not retry-able or retry gave up
java.lang.NullPointerException: null
	at org.apache.curator.utils.Compatibility.getHostAddress(Compatibility.java:116)
	at org.apache.curator.framework.imps.EnsembleTracker.configToConnectionString(EnsembleTracker.java:185)
	at org.apache.curator.framework.imps.EnsembleTracker.processConfigData(EnsembleTracker.java:206)
	at org.apache.curator.framework.imps.EnsembleTracker.access$300(EnsembleTracker.java:50)
	at org.apache.curator.framework.imps.EnsembleTracker$2.processResult(EnsembleTracker.java:150)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:892)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:649)
	at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152)
	at org.apache.curator.framework.imps.GetConfigBuilderImpl$2.processResult(GetConfigBuilderImpl.java:222)
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:630)
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:551)

</code></pre></div>
<h1 dir="auto">follow Issues15985</h1>
<h2 dir="auto">question</h2>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="I asked several developers. The names of the databases and tables they write are regular. If the name of the database and the name of the table have no rules and ,There are no rules for the key in the datasourceMap,how to write the fragmentation table, automatic fragmentation table, automatic fragmentation algorithm and standard allocation algorithm?"><pre class="notranslate"><span class="pl-smi">I</span> <span class="pl-s1">asked</span> <span class="pl-smi">several</span> <span class="pl-s1">developers</span>. <span class="pl-s1">The</span> <span class="pl-s1">names</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">databases</span> <span class="pl-s1">and</span> <span class="pl-s1">tables</span> <span class="pl-s1">they</span> <span class="pl-s1">write</span> <span class="pl-s1">are</span> <span class="pl-s1">regular</span>. <span class="pl-s1">If</span> <span class="pl-s1">the</span> <span class="pl-s1">name</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">database</span> <span class="pl-s1">and</span> <span class="pl-s1">the</span> <span class="pl-s1">name</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">table</span> <span class="pl-s1">have</span> <span class="pl-s1">no</span> <span class="pl-s1">rules</span> <span class="pl-s1">and</span> ,<span class="pl-s1">There</span> <span class="pl-smi">are</span> <span class="pl-s1">no</span> <span class="pl-smi">rules</span> <span class="pl-s1">for</span> <span class="pl-smi">the</span> <span class="pl-s1">key</span> <span class="pl-smi">in</span> <span class="pl-s1">the</span> <span class="pl-s1">datasourceMap</span>,<span class="pl-s1">how</span> <span class="pl-smi">to</span> <span class="pl-s1">write</span> <span class="pl-smi">the</span> <span class="pl-s1">fragmentation</span> <span class="pl-s1">table</span>, <span class="pl-s1">automatic</span> <span class="pl-smi">fragmentation</span> <span class="pl-s1">table</span>, <span class="pl-s1">automatic</span> <span class="pl-smi">fragmentation</span> <span class="pl-s1">algorithm</span> <span class="pl-smi">and</span> <span class="pl-s1">standard</span> <span class="pl-smi">allocation</span> <span class="pl-s1">algorithm</span>?</pre></div>
<h2 dir="auto">help</h2>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="i need you help , please give me an example demo  ,thank you"><pre class="notranslate"><span class="pl-smi">i</span> <span class="pl-s1">need</span> <span class="pl-smi">you</span> <span class="pl-s1">help</span> , <span class="pl-s1">please</span> <span class="pl-smi">give</span> <span class="pl-s1">me</span> <span class="pl-smi">an</span> <span class="pl-s1">example</span> <span class="pl-s1">demo</span>  ,<span class="pl-s1">thank</span> <span class="pl-s1">you</span></pre></div>