natehuangting opened a new issue, #18360:
URL: https://github.com/apache/shardingsphere/issues/18360
## Bug Report
### Which version of ShardingSphere did you use?
5.1.2
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Using MySQLNormalReplicationDatabaseDiscoveryProviderAlgorithm, when the
result of 'show slave status' is null or the value of 'second_behind_master' is
null, it should be considered as delayed replication.
### Actual behavior
The replication delay value returned is 0.
```java
private long queryReplicationDelayMilliseconds(final Statement statement)
throws SQLException {
try (ResultSet resultSet = statement.executeQuery(SHOW_SLAVE_STATUS)) {
return resultSet.next() ? resultSet.getLong("Seconds_Behind_Master")
* 1000L : 0L;
}
}
```
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]