You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/14 11:19:06 UTC

[GitHub] [shardingsphere] natehuangting opened a new issue, #18360: If 'show slave status' is null or 'second_behind_master' is null, replication delay should not be 0

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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zjcnb closed issue #18360: If 'show slave status' is null or 'second_behind_master' is null, replication delay should not be 0

Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #18360: If 'show slave status' is null or 'second_behind_master' is null, replication delay should not be 0
URL: https://github.com/apache/shardingsphere/issues/18360


-- 
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] zjcnb commented on issue #18360: If 'show slave status' is null or 'second_behind_master' is null, replication delay should not be 0

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18360:
URL: https://github.com/apache/shardingsphere/issues/18360#issuecomment-1155898187

   Yeah, you are right.


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