-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lightning: refine write and ingest logic more like producer-consumer #40692
Conversation
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
} | ||
} | ||
|
||
err := local.writeAndIngestPairs(ctx, job) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not move this logic to the job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I want the job to provide single actions, so we may extend more action like scanRegion in future and the worker can call single action like a state machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about abstracting a worker struct and moving all this logic to the worker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extend more action like scanRegion in future
can make job a interface, worker can just call job.execute(ctx)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about abstracting a worker struct and moving all this logic to the worker?
What about this? I think a struct like jobWorker
is more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That require a lof of work, I prefer we finish this PR timely and leave it for future work.
we can do it when integrate engine/backend with LOAD DATA/DDL.
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
/run-integration-br-tests |
Signed-off-by: lance6716 <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
/run-integration-br-tests |
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will review later
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
Signed-off-by: lance6716 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address existing comments. Almost LGTM.
Signed-off-by: lance6716 <[email protected]>
/run-integration-br-test |
This pull request has been accepted and is ready to merge. Commit hash: 7ceb901
|
What problem does this PR solve?
Issue Number: close #40725
Problem Summary:
What is changed and how it works?
propose
regionJob
which is dedicated to do data importing on a region. Add worker to handle regionJob and let producer to generate regionJob.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.