Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
maestro-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
maestro
maestro-core
Commits
1ee22e11
Commit
1ee22e11
authored
Aug 25, 2021
by
Ali Mohammed
Browse files
Options
Downloads
Patches
Plain Diff
debugging messages and handle test demand better
parent
02f14e0d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
maestro/cdo.c
+15
-7
15 additions, 7 deletions
maestro/cdo.c
with
15 additions
and
7 deletions
maestro/cdo.c
+
15
−
7
View file @
1ee22e11
...
@@ -864,7 +864,7 @@ mstro_status mstro_request_wait(mstro_request request) {
...
@@ -864,7 +864,7 @@ mstro_status mstro_request_wait(mstro_request request) {
ERR
(
"Invalid maestro async operation request handle
\n
"
);
ERR
(
"Invalid maestro async operation request handle
\n
"
);
return
MSTRO_INVARG
;
return
MSTRO_INVARG
;
}
}
DEBUG
(
"Wait for cdo asynchronous operation (%s) to comp
e
lte
\n
"
,
mstro_cdo_state_describe
(
request
->
target_state
));
DEBUG
(
"Wait for cdo asynchronous operation (%s) to compl
e
te
\n
"
,
mstro_cdo_state_describe
(
request
->
target_state
));
/*initialize the wait flag value for the request*/
/*initialize the wait flag value for the request*/
request
->
wait_flag
=
0
;
request
->
wait_flag
=
0
;
...
@@ -994,13 +994,20 @@ bool mstro_request_test(mstro_request request) {
...
@@ -994,13 +994,20 @@ bool mstro_request_test(mstro_request request) {
}
}
/** stage 2 of demand with pm*/
/** stage 2 of demand with pm*/
else
if
(
request
->
target_state
==
MSTRO_CDO_STATE_SATISFIED
)
{
else
if
(
request
->
target_state
==
MSTRO_CDO_STATE_SATISFIED
)
{
if
((
mstro_cdo_state_get
(
request
->
cdo
)
!=
MSTRO_CDO_STATE_SATISFIED
))
{
DEBUG
(
"Will have to wait until cdo state is advanced to MSTRO_CDO_STATE_SATISFIED
\n
"
);
status
=
false
;
}
else
{
/** This function does not wait or block, it just completes the demand operation*/
/** This function does not wait or block, it just completes the demand operation*/
DEBUG
(
"Async demand SATISFIED ...advancing target state to DEMANDED
\n
"
);
mstro_cdo_wait_demand_async_with_pm
(
request
);
mstro_cdo_wait_demand_async_with_pm
(
request
);
request
->
target_state
=
MSTRO_CDO_STATE_DEMANDED
;
request
->
target_state
=
MSTRO_CDO_STATE_DEMANDED
;
/* reduce number of waiters */
/* reduce number of waiters */
mstro_pool_cdo_waiters
(
request
->
cdo
,
-
1
);
mstro_pool_cdo_waiters
(
request
->
cdo
,
-
1
);
status
=
true
;
status
=
true
;
}
}
}
return
status
;
return
status
;
}
}
...
@@ -1749,6 +1756,7 @@ mstro_cdo_demand_async(mstro_cdo cdo, mstro_request *request)
...
@@ -1749,6 +1756,7 @@ mstro_cdo_demand_async(mstro_cdo cdo, mstro_request *request)
if
(
g_have_pool_manager
)
{
if
(
g_have_pool_manager
)
{
/** stage 1 is that the PM statify the request*/
/** stage 1 is that the PM statify the request*/
(
*
request
)
->
target_state
=
MSTRO_CDO_STATE_SATISFIED
;
(
*
request
)
->
target_state
=
MSTRO_CDO_STATE_SATISFIED
;
DEBUG
(
"request target state is %s
\n
"
,
mstro_cdo_state_describe
((
*
request
)
->
target_state
));
}
else
{
}
else
{
/** need to check the local pool */
/** need to check the local pool */
(
*
request
)
->
target_state
=
MSTRO_CDO_STATE_DEMANDED
;
(
*
request
)
->
target_state
=
MSTRO_CDO_STATE_DEMANDED
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment