You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zhaojinchao95 (via GitHub)" <gi...@apache.org> on 2023/01/28 10:55:42 UTC
[GitHub] [shardingsphere] zhaojinchao95 opened a new issue, #23784: Optimizate BaseRALE2EIT and GeneralRDLE2EIT remove wait memory refresh times
zhaojinchao95 opened a new issue, #23784:
URL: https://github.com/apache/shardingsphere/issues/23784
[master](https://github.com/apache/shardingsphere/commit/b796096c8a5d50b090ad162a6deae439250a6187)
Now, ShardingSphere's BaseRALE2EIT and GeneralRDLE2EIT Need to wait memory refresh metadata when execute DistSQL with cluster mode. Because metadata refresh is dependent on governance events, the time is immeasurable.
`GeneralRALE2EIT:`
```
private void assertResultSet(final Statement statement) throws SQLException, ParseException {
if (null == getAssertion().getAssertionSQL()) {
assertResultSet(statement, getSQL());
} else {
statement.execute(getSQL());
sleep();
assertResultSet(statement, getAssertion().getAssertionSQL().getSql());
}
}
private void assertResultSet(final Statement statement, final String sql) throws SQLException {
try (ResultSet resultSet = statement.executeQuery(sql)) {
assertResultSet(resultSet);
}
}
```
```
private void sleep() {
try {
TimeUnit.SECONDS.sleep(2);
} catch (final InterruptedException ignored) {
}
}
```
`GeneralRDLE2EIT:`
```
@Test
public void assertExecute() throws SQLException, ParseException {
assertNotNull("Assertion SQL is required", getAssertion().getAssertionSQL());
try (Connection connection = getTargetDataSource().getConnection()) {
try (Statement statement = connection.createStatement()) {
executeSQLCase(statement);
sleep();
assertResultSet(statement);
}
}
}
private void executeSQLCase(final Statement statement) throws SQLException, ParseException {
statement.execute(getSQL());
}
private void assertResultSet(final Statement statement) throws SQLException {
try (ResultSet resultSet = statement.executeQuery(getAssertion().getAssertionSQL().getSql())) {
assertResultSet(resultSet);
}
}
```
--
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] Optimizate BaseRALE2EIT and GeneralRDLE2EIT remove wait memory refresh times [shardingsphere]
Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 closed issue #23784: Optimizate BaseRALE2EIT and GeneralRDLE2EIT remove wait memory refresh times
URL: https://github.com/apache/shardingsphere/issues/23784
--
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 commented on issue #23784: Optimizate BaseRALE2EIT and GeneralRDLE2EIT remove wait memory refresh times
Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 commented on issue #23784:
URL: https://github.com/apache/shardingsphere/issues/23784#issuecomment-1432481440
Releate #24106
--
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] Optimizate BaseRALE2EIT and GeneralRDLE2EIT remove wait memory refresh times [shardingsphere]
Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 commented on issue #23784:
URL: https://github.com/apache/shardingsphere/issues/23784#issuecomment-2227808182
Duplicate https://github.com/apache/shardingsphere/issues/24106
--
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