Hello.
The script has a table background_task to store tasks names and date of last execution and background_task_log to store logs. The way it works now the storage servers will also update the background_task every time. Those updates are uselessness since the background_task table doesn't have the server id, rendering impossible to know which server updated it.
Since the background_task is myisam and all crons execute +/- at the same second (on the beginning of the minute) this table may suffer from locks when using many storage servers.
I suggest to add an serverId field on this table or prevent storage servers from write on it. Adding a new field is not a good solution since it will repeat the task names unnecessarily. A better approach is not writing on this table at all and create a view to get the values directly from the background_tasks_log.
The script has a table background_task to store tasks names and date of last execution and background_task_log to store logs. The way it works now the storage servers will also update the background_task every time. Those updates are uselessness since the background_task table doesn't have the server id, rendering impossible to know which server updated it.
Since the background_task is myisam and all crons execute +/- at the same second (on the beginning of the minute) this table may suffer from locks when using many storage servers.
I suggest to add an serverId field on this table or prevent storage servers from write on it. Adding a new field is not a good solution since it will repeat the task names unnecessarily. A better approach is not writing on this table at all and create a view to get the values directly from the background_tasks_log.