You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "peilinqian (via GitHub)" <gi...@apache.org> on 2023/11/07 01:59:09 UTC
[I] A single table is successfully created.However,the ZK registration center doesn't contain the table information. [shardingsphere]
peilinqian opened a new issue, #28965:
URL: https://github.com/apache/shardingsphere/issues/28965
## 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?
/usr/bin/java
we find java version: java8, full_version=1.8.0_242, full_path=/usr/bin/java
ShardingSphere-5.4.2-SNAPSHOT
Commit ID: dirty-152f56c1195f324d310e794c443bec2b3be7190d
Commit Message: Improve CDCImporter finished flag
Branch: fix
Build time: 2022-12-12T03:18:10+0800
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
A single table is successfully created.However,the ZK registration center contain the table information.
### Actual behavior
A single table is successfully created.However,the ZK registration center doesn't contain the table information. "ERROR: Table or view `table_type_002` does not exist."returned when select the table.

### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
**excute the create script**
gsql -d sharding_db -p 13000 -h 20.20.20.52 -U root -W root -r -f "create.sql"
### Example codes for reproduce this issue (such as a github link).
create.sql
```
create table table_type_001(c_integer integer);
create table table_type_002(c_tinyint tinyint);
create table table_type_003(c_smallint smallint);
create table table_type_004(c_binary_integer binary_integer);
create table table_type_005(c_bigint bigint);
create table table_type_006(c_numeric numeric(38,5));
create table table_type_007(c_number number(38,3));
create table table_type_008(c_smallserial smallserial);
create table table_type_009(c_serial serial);
create table table_type_010(c_bigserial bigserial);
create table table_type_011(c_real real);
create table table_type_012(c_float float(3));
create table table_type_013(c_double_precision double precision);
create table table_type_014(c_binary_double binary_double);
create table table_type_015(c_dec dec(38));
create table table_type_016(c_integer1 integer(38));
create table table_type_017(c_money money);
create table table_type_018(c_boolean boolean);
create table table_type_019(c_char char(10));
create table table_type_020(c_varchar varchar(20));
create table table_type_021(c_varchar2 varchar2(20));
create table table_type_022(c_nvarchar2 nvarchar2(10));
create table table_type_023(c_clob clob);
create table table_type_024(c_text text);
create table table_type_025(c_name name);
create table table_type_026(c_char1 "char");
create table table_type_027(c_blob blob);
create table table_type_028(c_raw raw);
create table table_type_029(c_date date);
create table table_type_030(c_time time without time zone );
create table table_type_031(c_time1 time with time zone);
create table table_type_032(c_time2 timestamp without time zone);
create table table_type_033(c_time3 timestamp with time zone);
create table table_type_034(c_time5 interval year (6));
create table table_type_035(c_point point);
create table table_type_036(c_box box);
create table table_type_037(c_path path);
create table table_type_038(c_circle circle);
create table table_type_039(c_inet inet);
create table table_type_040(c_bit bit(10));
create table table_type_041(c_tsvector tsvector);
create table table_type_042(c_tsquery tsquery);
create table table_type_043(c_uuid uuid);
create table table_type_044(c_json json);
create table table_type_045(c_json jsonb);
--插入数据
refresh database metadata from governance center;
refresh table metadata ;--刷新表结构
insert into table_type_001 values (1);
insert into table_type_002 values (10);
insert into table_type_003 values (2);
insert into table_type_004 values (5);
insert into table_type_005 values (20);
insert into table_type_006 values (123456.122331);
insert into table_type_007 values (123456.12233);
insert into table_type_008 values (default);
insert into table_type_009 values (default);
insert into table_type_010 values (default);
insert into table_type_011 values (10.365456);
insert into table_type_012 values (123456.1234);
insert into table_type_013 values (321.321);
insert into table_type_014 values (10.365456);
insert into table_type_015 values (123.123654);
insert into table_type_016 values (123.1236547);
insert into table_type_017 values (25.98);
insert into table_type_018 values ('yes');
insert into table_type_019 values ('数据库');
insert into table_type_020 values ('学习数据库' );
insert into table_type_021 values ('设计' );
insert into table_type_022 values ('工程师' );
insert into table_type_023 values ('测试' );
insert into table_type_024 values ('测试呀' );
insert into table_type_025 values ('视图' );
insert into table_type_026 values ('a');
insert into table_type_027 values (empty_blob() );
insert into table_type_028 values ('deadbeef' );
insert into table_type_029 values ('11-20-2020' );
insert into table_type_030 values ('21:21:21' );
insert into table_type_031 values ('21:21:21 pst' );
insert into table_type_032 values ('2010-12-12' );
insert into table_type_033 values ('2013-12-11 pst' );
insert into table_type_034 values (interval '2' year);
insert into table_type_035 values (point '(2.0,0)');
insert into table_type_036 values (box '((0,0),(1,1))');
insert into table_type_037 values (path'((1,0),(0,1),(-1,0))' );
insert into table_type_038 values (circle '((0,0),10)');
insert into table_type_039 values ('192.168.1.14' );
insert into table_type_040 values (b'1011111100');
insert into table_type_041 values (to_tsvector('english', 'the fat rats') );
insert into table_type_042 values (to_tsquery('fat:ab & cats'));
insert into table_type_043 values ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11');
insert into table_type_044 values ('{"f1":1,"f2":true,"f3":"hi"}');
insert into table_type_045 values ('{"f1":1,"f2":true,"f3":"hi"}');
```
--
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
Re: [I] A single table is successfully created.However,the ZK registration center doesn't contain the table information. [shardingsphere]
Posted by "peilinqian (via GitHub)" <gi...@apache.org>.
peilinqian commented on issue #28965:
URL: https://github.com/apache/shardingsphere/issues/28965#issuecomment-1797324480
zk single tables

--
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
Re: [I] A single table is successfully created.However,the ZK registration center doesn't contain the table information. [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28965:
URL: https://github.com/apache/shardingsphere/issues/28965#issuecomment-3657967992
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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
Re: [I] A single table is successfully created.However,the ZK registration center doesn't contain the table information. [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #28965: A single table is successfully created.However,the ZK registration center doesn't contain the table information.
URL: https://github.com/apache/shardingsphere/issues/28965
--
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
Re: [I] A single table is successfully created.However,the ZK registration center doesn't contain the table information. [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28965:
URL: https://github.com/apache/shardingsphere/issues/28965#issuecomment-1846032484
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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
Re: [I] A single table is successfully created.However,the ZK registration center doesn't contain the table information. [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #28965:
URL: https://github.com/apache/shardingsphere/issues/28965#issuecomment-3621597085
### Problem Understanding
- In 5.4.2-SNAPSHOT (built in 2022-12, dirty), using ShardingSphere-Proxy with ZooKeeper governance, a batch of CREATE TABLE statements succeeds in the physical DB, but ZooKeeper does not show table metadata and queries return “Table or view table_type_002 does not
exist.”
### Root Cause
- Likely the new single-table metadata was not persisted to the governance center, commonly because the DDL did not go through Proxy or only refresh … from governance center was used without syncing from the source database.
### Analysis
- Per official usage, all DDL should be executed through Proxy so metadata is written to the registry; if tables are created directly on the backend, you need DistSQL REFRESH TABLE METADATA FROM SOURCE to sync metadata (doc: https://shardingsphere.apache.org/document/
current/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/refresh-table-metadata/ (https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/refresh-table-metadata/)).
### Conclusion
- Could you confirm whether the CREATE TABLE statements were executed via ShardingSphere-Proxy or directly on the backend database? This will help determine if it’s a usage gap or needs deeper investigation.
--
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