Improve scaling abnormal recovery ability
I think the scaling job always successes in the end, we should try our best to make it complete. The network exception and task execute node crash are the two main reasons which synchronization is failure.
- We can re run executor when network exception.
- For executor node crash, we can dependency scheduling framework rescheduling mechanism, such as elastic job and kubernetes.
- For other reasons, we need admin to fix the problems, but do not shutdown other tasks.
Breakpoint resume ability
This is necessary for abnormal recovery ability.
- For inventory, we read data order by primary key order, it make us can mark it and re run by this. If there no primary key, we only can read full inventory data.
- For incremental, there is a log position, and we just need to persistence the position.
- Abount the position persistence, i think we can asynchronous persistence to zk.
Good suggestion.
There is one question for
We can re run executor when network exception.
Whether re-run the executor or just re-try the command which network excepted?
For example, the dumper query with SQL select and caused exception by network. Can we just retry this SQL rather than restart this dumper?
If we want the breakpoint resume in inventory dumper, I think restart the dumper rather than retry SQL. Otherwise just like you say. In importer, we just retry SQL rather than restart importer.
Task
- [ ] Persistence task position info
- [ ] Importer retry insert when network exception
- [ ] Dumper restart when network exception
- [ ] Start with task position info when dumper start