shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Improve scaling abnormal recovery ability

Open avalon5666 opened this issue 6 years ago • 3 comments

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.

avalon5666 avatar May 06 '20 14:05 avalon5666

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?

KomachiSion avatar May 07 '20 00:05 KomachiSion

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.

avalon5666 avatar May 07 '20 02:05 avalon5666

Task

  • [ ] Persistence task position info
  • [ ] Importer retry insert when network exception
  • [ ] Dumper restart when network exception
  • [ ] Start with task position info when dumper start

avalon5666 avatar May 10 '20 14:05 avalon5666