Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception occurred postgre backend execute DDL statement in transaction #31244

Open
Gii16 opened this issue May 16, 2024 · 0 comments
Open

Exception occurred postgre backend execute DDL statement in transaction #31244

Gii16 opened this issue May 16, 2024 · 0 comments

Comments

@Gii16
Copy link

Gii16 commented May 16, 2024

Bug Report

Which version of ShardingSphere did you use?

5.4.0

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

I use a SQL client to send command to ShardingSphere-Proxy and forward to postgre DB. I execute DDL statement in transaction.

Statements as follow:
1.begin;
2.create table table_name;
3.create index on table_name;
4.commit;

Actual behavior

There is a null point exception. I lost log in server so I can't display it. However, I know the reason.

Reason analyze (If you can)

Get an exception while execute refreshMetaData() in DatabaseConnector#doExecute(). Cause the table created in step 2 can not be seen in step3.
SchemaMetaDataLoaderEngine#load will get another connection to get meta data. There is an isolation between two connections.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant