You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by Zonglei Dong <dz...@163.com> on 2019/11/21 02:29:29 UTC

How to load table's Metadata in non sharding?

Hi ShardingSphere Team:


I want to ask a question.


If the databases or tables are sharding, ShardingSphere will load the tables MetaData, but if they aren’t not sharding, e.g only master-slave, ShardingSphere will not load the tables MetaData.


I read the source code.


org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.java


I find a “TODO” describe in the construct method.
“// TODO we should remove it after none-sharding parsingEngine completed."


And what is the "none-sharding parsingEngine”, and when does it completed?


Thanks.
Zonglei Dong
Apache ShardingSphere


Re: How to load table's Metadata in non sharding?

Posted by Zonglei Dong <dz...@163.com>.

OK, I understand, Thanks!


Zonglei Dong
Apache ShardingSphere


On 11/21/2019 11:45,zhangliang@apache.org<zh...@apache.org> wrote:
Hi

This thread include 2 questions, I just answer it one by one.

1. If the databases or tables aren’t sharding, e.g only master-slave,
ShardingSphere will not load the tables MetaData.

Yes, it depends on whether the feature need meta data. Sharding and Encrypt
need meta data, but master-slave do not, so ShardingSphere do not load meta
data if master-slave only

2. About the source code
`org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.java`

Because ShardingSphere just finished develop the new parse engine which
supported all SQLs, the "none-sharding parsingEngine” has already completed.
The TODO is for old parse engine only, we need to remove ShardingRule
for master-slave only in future.

------------------

Liang Zhang (John)
Apache ShardingSphere & Dubbo


Zonglei Dong <dz...@163.com> 于2019年11月21日周四 上午10:29写道:

Hi ShardingSphere Team:


I want to ask a question.


If the databases or tables are sharding, ShardingSphere will load the
tables MetaData, but if they aren’t not sharding, e.g only master-slave,
ShardingSphere will not load the tables MetaData.


I read the source code.



org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.java


I find a “TODO” describe in the construct method.
“// TODO we should remove it after none-sharding parsingEngine completed."


And what is the "none-sharding parsingEngine”, and when does it completed?


Thanks.
Zonglei Dong
Apache ShardingSphere



Re: How to load table's Metadata in non sharding?

Posted by "zhangliang@apache.org" <zh...@apache.org>.
Hi

This thread include 2 questions, I just answer it one by one.

1. If the databases or tables aren’t sharding, e.g only master-slave,
ShardingSphere will not load the tables MetaData.

Yes, it depends on whether the feature need meta data. Sharding and Encrypt
need meta data, but master-slave do not, so ShardingSphere do not load meta
data if master-slave only

2. About the source code
`org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.java`

Because ShardingSphere just finished develop the new parse engine which
supported all SQLs, the "none-sharding parsingEngine” has already completed.
The TODO is for old parse engine only, we need to remove ShardingRule
for master-slave only in future.

------------------

Liang Zhang (John)
Apache ShardingSphere & Dubbo


Zonglei Dong <dz...@163.com> 于2019年11月21日周四 上午10:29写道:

> Hi ShardingSphere Team:
>
>
> I want to ask a question.
>
>
> If the databases or tables are sharding, ShardingSphere will load the
> tables MetaData, but if they aren’t not sharding, e.g only master-slave,
> ShardingSphere will not load the tables MetaData.
>
>
> I read the source code.
>
>
>
> org.apache.shardingsphere.shardingproxy.backend.schema.impl.MasterSlaveSchema.java
>
>
> I find a “TODO” describe in the construct method.
> “// TODO we should remove it after none-sharding parsingEngine completed."
>
>
> And what is the "none-sharding parsingEngine”, and when does it completed?
>
>
> Thanks.
> Zonglei Dong
> Apache ShardingSphere
>
>