You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/11/14 11:59:56 UTC
[GitHub] [shardingsphere] peilinqian opened a new issue, #22173: The parameter value of is not verified.
peilinqian opened a new issue, #22173:
URL: https://github.com/apache/shardingsphere/issues/22173
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
### Expected behavior
### Actual behavior
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
### Example codes for reproduce this issue (such as a github link).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] peilinqian commented on issue #22173: The parameter value of sql-federation-type is not verified.
Posted by GitBox <gi...@apache.org>.
peilinqian commented on issue #22173:
URL: https://github.com/apache/shardingsphere/issues/22173#issuecomment-1320850490
we find java version: java8, full_version=1.8.0_282, full_path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/bin/java
ShardingSphere-5.2.2-SNAPSHOT
Commit ID: dirty-753c0cee8ee6fd3db00536da55b64bc5198a3758
Commit Message: Optimize sqlFederationExecutor init logic when sqlFederationType modify dynamically (#22209)
Branch: 753c0cee8ee6fd3db00536da55b64bc5198a3758
Build time: 2022-11-19T10:18:41+0800
test_db=> set dist variable sql_federation_type="ADVANCED";
SUCCESS
test_db=> select * from t_ssdb_tb a left join t_ssdb b on (a.id = b.id);
id | c_id | a | b | id | c_id | a | b
----+------+----+------------+----+------+----+------------
2 | 2 | 20 | test22 | 2 | 1 | 20 | test21
2 | 2 | 20 | test22 | 2 | 2 | 20 | test22
2 | 2 | 20 | test22 | 2 | 3 | | Test22
4 | 4 | 40 | test4 | 4 | 4 | 40 | test4
6 | 6 | 66 | Test66 | | | |
2 | 1 | 20 | test21 | 2 | 1 | 20 | test21
2 | 1 | 20 | test21 | 2 | 2 | 20 | test22
2 | 1 | 20 | test21 | 2 | 3 | | Test22
2 | 3 | | Test22 | 2 | 1 | 20 | test21
2 | 3 | | Test22 | 2 | 2 | 20 | test22
2 | 3 | | Test22 | 2 | 3 | | Test22
1 | 2 | 10 | Test12 | 1 | 1 | 10 | test11
1 | 2 | 10 | Test12 | 1 | 2 | 10 | Test12
1 | 2 | 10 | Test12 | 1 | 2 | | test12
1 | 2 | | test12 | 1 | 1 | 10 | test11
1 | 2 | | test12 | 1 | 2 | 10 | Test12
1 | 2 | | test12 | 1 | 2 | | test12
1 | 1 | 10 | test11 | 1 | 1 | 10 | test11
1 | 1 | 10 | test11 | 1 | 2 | 10 | Test12
1 | 1 | 10 | test11 | 1 | 2 | | test12
3 | 3 | | test3 | 3 | 3 | | test3
3 | 3 | | test3 | 3 | 3 | | test3
3 | 3 | | test3 | 3 | 3 | | test3
3 | 3 | | test3 | 3 | 3 | | test3
5 | 5 | 50 | Test5 | 5 | 5 | 50 | Test5
(25 rows)
test_db=> set dist variable sql_federation_type="ADVANCED1";
SUCCESS
test_db=> select * from t_ssdb_tb a left join t_ssdb b on (a.id = b.id);
ERROR: ADVANCED1 is not a valid sqlFederationType.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #22173: The parameter value of sql-federation-type is not verified.
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #22173:
URL: https://github.com/apache/shardingsphere/issues/22173#issuecomment-1316718898
After pr 22209 was merged, it will throw exception when we config wrong sql-federation-type props.
![image](https://user-images.githubusercontent.com/10829171/202149060-786722fe-c6dc-4cdb-b0c5-39ee09a27587.png)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zhaojinchao95 closed issue #22173: The parameter value of sql-federation-type is not verified.
Posted by GitBox <gi...@apache.org>.
zhaojinchao95 closed issue #22173: The parameter value of sql-federation-type is not verified.
URL: https://github.com/apache/shardingsphere/issues/22173
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] peilinqian commented on issue #22173: The parameter value of sql-federation-type is not verified.
Posted by GitBox <gi...@apache.org>.
peilinqian commented on issue #22173:
URL: https://github.com/apache/shardingsphere/issues/22173#issuecomment-1321528166
```
#!/usr/bin/env bash
parent_dir=$(pwd)
echo $parent_dir
cd $parent_dir
sharding_target_home=$parent_dir
tar_names=`ls |grep .tar.gz|grep apache-shardingsphere`
tar_name=${tar_names[0]}
tar_dir=${tar_name%.*.*}
abs_tar_dir=$parent_dir/$tar_dir
if [ -d "$abs_tar_dir" ] ; then
echo "stop sharding first"
echo $abs_tar_dir
$parent_dir/ss_home/bin/stop.sh
else
echo "sharding not running"
fi
rm -rf $tar_dir
tar zxf ./$tar_name
rm -rf ss-conf
mkdir ss-conf
cd $abs_tar_dir
cp -r conf/* ../ss-conf
rm -rf conf
ln -sf $parent_dir/ss-conf conf
cd $parent_dir
rm -rf ss_home
ln -sf $abs_tar_dir ss_home
bash ss_home/bin/start.sh --version
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] peilinqian commented on issue #22173: The parameter value of sql-federation-type is not verified.
Posted by GitBox <gi...@apache.org>.
peilinqian commented on issue #22173:
URL: https://github.com/apache/shardingsphere/issues/22173#issuecomment-1321594008
```
"""
Case Type : 环境配置
Case Name : 配置通用sharding规则,进行启动
Create At : 2022/10/21
Owner : pwx5328113
Description :
1、检查涉及opengasus节点状态
2、远程复制解压安装脚本
3、配置server.yaml
4、配置config-*.yaml
5、清理ZK缓存信息
6、重启ss-proxy
Expect :
1、检查涉及opengasus节点状态,状态正常
2、远程复制解压安装脚本,成功
3、配置server.yaml,成功
4、配置config-*.yaml,成功
5、清理ZK缓存信息,
6、重启ss-proxy
History :
"""
import os
import unittest
from testcase.utils.Constant import Constant
from testcase.utils.Logger import Logger
from testcase.utils.OgCommonSH import OgCommonSH
from testcase.utils.SsCommonSH import SsCommonSH
from yat.test import macro
class commonConfigStart(unittest.TestCase):
def setUp(self):
self.log = Logger()
self.constant = Constant()
self.log.info(f'----{os.path.basename(__file__)}:start----')
self.pri1_sh = OgCommonSH('ds0_pri_DbUser')
self.pri1_sh.db_instance_path = macro.DB_INSTANCE_PATH1
self.pri1_sh.db_env_path = macro.DB_ENV_PATH1
self.pri2_sh = OgCommonSH('ds1_pri_DbUser')
self.pri2_sh.db_instance_path = macro.DB_INSTANCE_PATH2
self.pri2_sh.db_env_path = macro.DB_ENV_PATH2
self.ss_sh = SsCommonSH('default')
def test_main(self):
step_txt = '---step1:检查涉及opengasus节点状态;expect:正常----'
self.log.info(step_txt)
self.assertTrue(self.pri1_sh.get_db_instance_status(),
'执行失败:' + step_txt)
self.assertTrue(self.pri2_sh.get_db_instance_status(),
'执行失败:' + step_txt)
step_txt = '---step2:远程复制解压安装脚本,并解压配置ss-proxy;expect:成功----'
self.log.info(step_txt)
self.assertTrue(self.ss_sh.config_ss(), '执行失败:' + step_txt)
step_txt = '----step3:配置server.yaml;expect:成功----'
self.log.info(step_txt)
self.assertTrue(self.ss_sh.config_server_yaml("ZK_User"),
'执行失败:' + step_txt)
step_txt = '----step4:配置config-*.yaml;expect:成功----'
self.log.info(step_txt)
nodes = ('ds0_pri_DbUser', 'ds1_pri_DbUser')
conf = self.ss_sh.config_sharding_yaml('config-db.yaml',
'batchMode=on\&LoggerLevel=off',
'',
*nodes)
self.assertTrue(conf, '执行失败:' + step_txt)
step_txt = '----step5:清理ZK缓存信息;expect:成功----'
self.log.info(step_txt)
self.assertTrue(self.ss_sh.clean_zk(zk_node_name='ZK_User'),
'执行失败:' + step_txt)
step_txt = '----step6:star ss-proxy;expect:成功----'
self.log.info(step_txt)
self.assertTrue(self.ss_sh.start_ss(), '执行失败:' + step_txt)
def tearDown(self):
self.log.info('----this is teardown----')
self.log.info(f'----{os.path.basename(__file__)}:end----')
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wsm12138 commented on issue #22173: The parameter value of sql-federation-type is not verified.
Posted by GitBox <gi...@apache.org>.
wsm12138 commented on issue #22173:
URL: https://github.com/apache/shardingsphere/issues/22173#issuecomment-1318434842
### version
```
ShardingSphere-5.2.2-SNAPSHOT
Commit ID: 753c0cee8ee6fd3db00536da55b64bc5198a3758
Commit Message: Optimize sqlFederationExecutor init logic when sqlFederationType modify dynamically (#22209)
Branch: 753c0cee8ee6fd3db00536da55b64bc5198a3758
Build time: 2022-11-17T15:15:38+0800
```
### sql_federation_type= correct value
```
sharding_db=> set dist variable sql_federation_type="ADVANCED";
SUCCESS
sharding_db=> select * from t_merchant union all select * from t_product;
merchant_id | country_id | merchant_name | business_code | telephone | creation_date
-------------+-----------------------+---------------+---------------+-------------+---------------
1 | 86 | tencent | 86000001 | 86100000001 | 2017-08-08
2 | 86 | haier | 86000002 | 86100000002 | 2017-08-08
3 | 86 | huawei | 86000003 | 86100000003 | 2017-08-08
4 | 86 | alibaba | 86000004 | 86100000004 | 2017-08-08
5 | 86 | lenovo | 86000005 | 86100000005 | 2017-08-08
6 | 86 | moutai | 86000006 | 86100000006 | 2017-08-08
7 | 86 | baidu | 86000007 | 86100000007 | 2017-08-08
8 | 86 | xiaomi | 86000008 | 86100000008 | 2017-08-08
9 | 86 | vivo | 86000009 | 86100000009 | 2017-08-08
10 | 86 | oppo | 86000010 | 86100000010 | 2017-08-08
11 | 1 | google | 01000011 | 01100000011 | 2017-08-08
12 | 1 | walmart | 01000012 | 01100000012 | 2017-08-08
13 | 1 | amazon | 01000013 | 01100000013 | 2017-08-08
14 | 1 | apple | 01000014 | 01100000014 | 2017-08-08
15 | 1 | microsoft | 01000015 | 01100000015 | 2017-08-08
16 | 1 | dell | 01000016 | 01100000016 | 2017-08-08
17 | 1 | johnson | 01000017 | 01100000017 | 2017-08-08
18 | 1 | intel | 01000018 | 01100000018 | 2017-08-08
19 | 1 | hp | 01000019 | 01100000019 | 2017-08-08
20 | 1 | tesla | 01000020 | 01100000020 | 2017-08-08
1 | qq coins | 2 | 200 | off sale | 2017-08-08
2 | haier washing machine | 4 | 3120.5 | on sale | 2017-08-08
3 | huawei mobile phones | 6 | 6666 | on sale | 2017-08-08
4 | alibaba cloud cards | 2 | 500 | on sale | 2017-08-08
5 | lenovo mobile phones | 6 | 3200 | off sale | 2017-08-08
6 | moutai liquor | 8 | 3200 | on sale | 2017-08-08
7 | baidu cloud cards | 2 | 700 | on sale | 2017-08-08
8 | xiaomi mobile phones | 6 | 2799 | on sale | 2017-08-08
9 | vivo mobile phones | 6 | 2899 | on sale | 2017-08-08
10 | oppo mobile phones | 6 | 2299 | on sale | 2017-08-08
11 | google mobile phones | 6 | 3399 | on sale | 2017-08-08
12 | walmart wine | 8 | 1000 | on sale | 2017-08-08
13 | amazon cloud cards | 2 | 1000 | on sale | 2017-08-08
14 | apple mobile phones | 6 | 8200 | on sale | 2017-08-08
15 | microsoft x-box | 9 | 5000 | on sale | 2017-08-08
16 | dell xps | 10 | 9000 | on sale | 2017-08-08
17 | johnson shampoo | 12 | 30 | on sale | 2017-08-08
18 | intel cpu | 10 | 1600 | on sale | 2017-08-08
19 | hp computer | 10 | 4600 | on sale | 2017-08-08
20 | tesla model 3 | 14 | 324600 | on sale | 2017-08-08
(40 rows)
```
### sql_federation_type= wrong value
```
sharding_db=> set dist variable sql_federation_type="ADVANCED1";
SUCCESS
sharding_db=> select * from t_merchant union all select * from t_product;
ERROR: ADVANCED1 is not a valid sqlFederationType.
sharding_db=> show single tables;
table_name | resource_name
------------------+---------------
t_merchant | ds_9
t_order_view | ds_0
t_product | ds_8
t_product_detail | ds_3
t_user | ds_1
(5 rows)
sharding_db=>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] peilinqian commented on issue #22173: The parameter value of sql-federation-type is not verified.
Posted by GitBox <gi...@apache.org>.
peilinqian commented on issue #22173:
URL: https://github.com/apache/shardingsphere/issues/22173#issuecomment-1321643617
schemaName: test_db
dataSources:
ds_0:
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 260
minPoolSize: 1
password: ds_0_pwd
url: jdbc:opengauss://ds_0_IP:ds_0_port/ds_0_db?batchMode=on
username: ds_0_usr
ds_1:
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 260
minPoolSize: 1
password: ds_1_pwd
url: jdbc:opengauss://ds_1_IP:ds_1_port/ds_1_db?batchMode=on
username: ds_1_usr
rules:
- !SHARDING
tables:
t_single:
actualDataNodes: ds_0.t_single
t_single_view:
actualDataNodes: ds_0.t_single_view
t_single_view_new:
actualDataNodes: ds_0.t_single_view_new
t_ssdb_tb:
actualDataNodes: ds_${0..1}.t_ssdb_tb_${0..1}
databaseStrategy:
standard:
shardingAlgorithmName: ds_database_inline
shardingColumn: id
tableStrategy:
standard:
shardingColumn: c_id
shardingAlgorithmName: ts_t_ssdb_tb_inline
t_ssdb_tb_view:
actualDataNodes: ds_${0..1}.t_ssdb_tb_view_${0..1}
databaseStrategy:
standard:
shardingAlgorithmName: ds_database_inline
shardingColumn: id
tableStrategy:
standard:
shardingColumn: c_id
shardingAlgorithmName: ts_t_ssdb_tb_view_inline
t_ssdb:
actualDataNodes: ds_${0..1}.t_ssdb
databaseStrategy:
standard:
shardingAlgorithmName: ds_database_inline
shardingColumn: id
t_ssdb_view:
actualDataNodes: ds_${0..1}.t_ssdb_view
databaseStrategy:
standard:
shardingAlgorithmName: ds_database_inline
shardingColumn: id
t_ssdb_tb1:
actualDataNodes: ds_${0..1}.t_ssdb_tb1_${0..1}
databaseStrategy:
standard:
shardingAlgorithmName: ds_database_inline
shardingColumn: id
tableStrategy:
standard:
shardingColumn: c_id
shardingAlgorithmName: ts_t_ssdb_tb1_inline
broadcastTables:
- t_broadcast
- t_broadcast_view
bindingTables:
- t_ssdb_tb, t_ssdb_tb1, t_ssdb_tb_view
defaultTableStrategy:
none:
defaultDatabaseStrategy:
none:
shardingAlgorithms:
ds_database_inline:
type: INLINE
props:
algorithm-expression: ds_${id % 2}
allow-range-query-with-inline-sharding: true
ts_t_ssdb_tb_inline:
type: INLINE
props:
algorithm-expression: t_ssdb_tb_${c_id % 2}
allow-range-query-with-inline-sharding: true
ts_t_ssdb_tb1_inline:
type: INLINE
props:
algorithm-expression: t_ssdb_tb1_${c_id % 2}
allow-range-query-with-inline-sharding: true
ts_t_ssdb_tb_view_inline:
type: INLINE
props:
algorithm-expression: t_ssdb_tb_view_${c_id % 2}
allow-range-query-with-inline-sharding: true
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org