Skip to content
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

Menu rebuild lock_wait stampede #67

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

unn
Copy link

@unn unn commented Feb 11, 2013

The lock_wait() in menu_rebuild() is harmful. During a menu_rebuild, we observed processes on web servers stuck for 30 seconds due to the lock_wait.

Since Pressflow is using a transaction, it seems unnecessary to wait the process until it has completed.

@pwolanin
Copy link
Contributor

A couple whitespace changes in there should be omitted.

@pwolanin
Copy link
Contributor

There are rare cases where the transaction will not be sufficient (e.g. the router or masks is empty), but I think those are rare enough to be worth trying this.

@@ -1697,25 +1697,25 @@ function menu_rebuild() {
// Wait for another request that is already doing this work.
// We choose to block here since otherwise the router item may not
// be avaiable in menu_execute_active_handler() resulting in a 404.
lock_wait('menu_rebuild');
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably adjust the code comments too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants