Closed Bug 859313 Opened 12 years ago Closed 12 years ago

lots of "Lock wait timeout exceeded" errors when updating TagNewUser's comment_count

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

[Mon Apr 08 05:05:20 2013] [error] DBD::mysql::db do failed: Lock wait timeout exceeded; try restarting transaction [for Statement "UPDATE profiles SET comment_count=? WHERE userid=?"] at /data/www/bugzilla.mozilla.org/extensions/TagNewUsers/Extension.pm line 169. there's some seriously high comment counts being needlessly updated -- we should just stop counting once a user has made more than COMMENT_COUNT (25) comments.
i realised that we actually only need to update the counter for users which are still new, rather than just checking the comment-count. i also performed some minor refactoring to skip calculating some stuff unnecessarily, and fixed how the css is being included on the show_bug page. Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/ modified extensions/TagNewUsers/Extension.pm missing extensions/TagNewUsers/template/en/default/hook/bug/comments-comment_banner.html.tmpl deleted extensions/TagNewUsers/template/en/default/hook/bug/comments-comment_banner.html.tmpl modified extensions/TagNewUsers/template/en/default/hook/bug/comments-user.html.tmpl added extensions/TagNewUsers/template/en/default/hook/bug/show-header-end.html.tmpl Committed revision 8724.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
i missed the creation_age being used outside of the template: Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/ modified extensions/TagNewUsers/Extension.pm Committed revision 8732.
Component: Extensions: Other → Extensions
You need to log in before you can comment on or make changes to this bug.