shardingsphere
shardingsphere copied to clipboard
use `overwrite=true` & yaml, replace logic db in zk
Bug Report
Which version of ShardingSphere did you use?
91d2d46cf9ea4d139478c2c9c6de8734ade7d4a1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
Expected behavior
show real table in logic db now
Actual behavior
show tables in logic db before
Reason analyze (If you can)
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
- start proxy in cluster mode
USE encrypt_db;
ADD RESOURCE ds (
HOST="127.0.0.1",
PORT=13309,
DB="before",
USER="root",
PASSWORD="test"
);
- stop proxy
- start proxy with yaml
databaseName: encrypt_db
dataSources:
ds_0:
password: test
url: jdbc:mysql://127.0.0.1:13309/after?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true
username: root
minPoolSize: 1
connectionTimeoutMilliseconds: 30000
maxLifetimeMilliseconds: 1800000
readOnly: false
idleTimeoutMilliseconds: 60000
maxPoolSize: 50
rules:
- !SINGLE {}
- !ENCRYPT
encryptors:
aes_encryptor:
props:
aes-key-value: 123456abc
type: AES
queryWithCipherColumn: false
tables:
sbtest1:
columns:
pad:
cipherColumn: pad_encrypt
encryptorName: aes_encryptor
logicColumn: pad
plainColumn: pad
name: sbtest1
overwrite=true
4.export database config;& show tables in encrypt_db
- refresh table metadata;
Example codes for reproduce this issue (such as a github link).
@wsm12138 Now, Proxy start up load governance center tables when governance center has tables. i see your datasource configuration db has changed. Do you think db has changed should be compare local and remote?
The overwrite parameter are deleted, please refer to #20552, and i think this is not a problem when finished it. So, i will close it.