-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capture: implement the task watcher (#337)
* capture: implement the task wather A task watcher waits for new tasks and returns the task event, than the capture can start a processor to handle the task. It is a replacement of the ChangeFeedWatcher and ProcessorWatcher, the new solution would be more clear and simpler. Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * owner: dispatch job to captures Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: init the cfg Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: fix when parsing a task key Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: watch in another goroutine Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: close the channel Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: refine the task persistent keys Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: add TaskStatusKeyPrefix Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: fix the status key Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: fix the path of task positions Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: fix the job etcd key Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * changefeed: fix the job path Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * build: fix go lint Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: support to handle the task commands Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: fix to return the correct task events Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: add unit tests for task watcher Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: add test case for resuming a task Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * processor: remove the task status/postion when stopped Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * capture: fix when handling TaskOpDelete Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * owner: remove unuseful log Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * tests: add availability integration tests Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * capture: remove unused functions Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * scheduler: log error message when running the processor Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * task: refine the task watcher and fix missing events Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * capture: return errors Signed-off-by: Shafreeck Sea <shafreeck@gmail.com> * processor: use info log level for context canceled Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
- Loading branch information
Showing
11 changed files
with
770 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.