Skip to content

wip #3865

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

wip #3865

wants to merge 1 commit into from

Conversation

waltdisgrace
Copy link
Contributor

No description provided.

@@ -470,8 +479,8 @@ do_pe_invoke_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void
crm_debug("Re-asking for the CIB: %d other peer updates still pending",
(num_cib_op_callbacks() - 1));
sleep(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to get rid of the sleep call - that's the whole point of moving the following code into a mainloop timer.

controld_set_fsa_action_flags(A_PE_INVOKE);
controld_trigger_fsa();
return G_SOURCE_CONTINUE;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is just replacing the sleep and following code in do_pe_invoke_callback, I think this is supposed to be a one-off timer. That is, it should only execute one time and the way we do that is by returning G_SOURCE_REMOVE and passing FALSE to mainloop_timer_add.

static void
do_pe_invoke_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *user_data)
{
char *ref = NULL;
pid_t watchdog = pcmk__locate_sbd();
static mainloop_timer_t *timer = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable shouldn't be static.

@clumens clumens added the review: in progress PRs that are currently being reviewed label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review: in progress PRs that are currently being reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants