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/13 11:32:57 UTC

[GitHub] [shardingsphere] natehuangting commented on pull request #18330: MySQL Normal Replication preferentially uses custom sql to judge replication delay

natehuangting commented on PR #18330:
URL: https://github.com/apache/shardingsphere/pull/18330#issuecomment-1153804369

   > @natehuangting Hi bro, thank you for your pull request. your idea so cool. But` select abs(unix_timestamp(now())-unix_timestamp(max(Ftime))) as delay from dba.delay_monitor limit 1` this sql is by yourself business definition? `ShardingSphere` not provide save insert time, So i think this feature are not suitable `ShardingSphere`. You can achieve your purpose by implemente `DatabaseDiscoveryProviderAlgorithm` interface.
   
   
   
   > @natehuangting Hi bro, thank you for your pull request. your idea so cool. But` select abs(unix_timestamp(now())-unix_timestamp(max(Ftime))) as delay from dba.delay_monitor limit 1` this sql is by yourself business definition? `ShardingSphere` not provide save insert time, So i think this feature are not suitable `ShardingSphere`. You can achieve your purpose by implemente `DatabaseDiscoveryProviderAlgorithm` interface.
   
   Thank you for your suggestion. My initial idea was to be compatible with the original mode. If the user does not define the sql, then use second_behind_master. I think your suggestion is very good. If it is independent, we can force the user to define the SQL.


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