Replies: 2 comments 1 reply
-
Please paste pictures in English so other engineers could participant, thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
-
As far as I know, it is possible that ORCA's design is based on the DXL structure. DXL supports DAG format, but the plan in PG is a tree structure, so the queue size is 1? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposers
jiaqizho
Proposal Status
Under Discussion
Abstract
About CJobQueue
As I understand it,
CJobQueue
is used to prevent do the sameCjob
.In CJob.h:L51 desc:
Also let me explain the logic of
JobQueue
in detail.Before we start, let me introduce two type of
CJob
inCJobQueue
Queued Cjob
: the position inCJobQuque
is >= 1Main CJob
: the position inCJobQuque
is 0If the
CJob
being executed is theQueued Cjob
Cjob
Type(Exploration/Implementation) in the sameCgroup
will be added to theCJobQuque
Cjob->FExecute()
is , theQueued CJob
will always return the false inCScheduler::FExecute
.CScheduler::FExecute
, theQueued CJob
will change to theEjrSuspended
state, until theMain CJob
release it.Main CJob
call theNotifyCompleted
, pop theQueued CJob
and it will resume the parent. it's parent still push its StateMachine, because theMain CJob
already do the same work in theCGroup
If the
CJob
being executed is theMain Cjob
, it can be executed after StateMachine finished and call theNotifyCompleted
logic.Git history
I looked through the git history of
CJobQuque
. it's added in the first version of ORCA(76feb99 gpdb). In early versions of ORCA, concurrent execution existed until the commit Remove multi-threading code (#510)(61c7405). Before this PR,CScheduler
can get theQueued Cjob
, causeCScheduler
will use the multi-threading to process the waitting list, and some of job may insert into the sameCJobQueue
.Proposal
In current version of CBDB, the ORCA is single-thread mode. So the size of each
CJobQuque
is always 1, also inCScheduler
won't get anyQueued Cjob
. I have verified this pointer in PR(#742, Although ORCA icw tests are not enabled in GITHUB CI, I have verified on my own machine that ICW-orca test does not trigger these assert(false)).There are two reasons to remove
CJobQueue
:CJobQueue
is dead logic of in current version ORCA.CSchedule
itself is a non-profitable endeavor. Maybe we should think of other acceleration processes.Impact on cherry-pick GP
This content has not been changed in subsequent GP versions. left is CBDB(show 46 search results), right is GPDB(show 46 search results).
Motivation
pass
Implementation
pass
Rollout/Adoption Plan
No response
Are you willing to submit a PR?
Beta Was this translation helpful? Give feedback.
All reactions