v1.5.0
When the proxysql cluster feature was activated scheduler update the epoch of the node owning the lock at each cycle.
This injects not needed writes that could create conflicts especially in an environment like k8.
solution: Refresh epoch after few cycles but inside the lockclustertimeout value ideally every 3/4 of the lockclustertimeout value.
Example:
scheduler loop every 2 seconds
lockclustertimeout = 600 seconds
lockrefreshtime = 450
Implementation:
add parameter lockrefreshtime
add check for sanity for the parameter lockrefreshtime to never be higher than 3/4 of lockclustertimeout
add a check in findLock method to return true only if lockrefreshtime has been exceeded
add proper information in log (INFO)